## CGAL::Triangulation_euclidean_traits_xy_3<K>

### Definition

The class Triangulation_euclidean_traits_xy_3<K> is a geometric traits class which alows to triangulate a terrain. This traits class is designed to build a two dimensional triangulation embedded in 3D space, i.e. a triangulated surface, such that its on the xy plane is a Delaunay triangulation. This is a usual construction for GIS terrains. Instead of really projecting the 3D points and maintaining a mapping between each point and its projection (which costs space and is error prone) the class Triangulation_euclidean_traits_xy_3<K> supplies geometric predicates that ignore the z-coordinate of the points.

The class is a model of the concept DelaunayTriangulationTraits_2 except that it does not provide the type and constructors required to build the dual Voronoi diagram.

### Parameters

The template parameter K has to be instantiated by a model of the Kernel concept. Triangulation_euclidean_traits_xy_3<K> uses types and predicates defined in K.

#include <CGAL/Triangulation_euclidean_traits_xy_3.h>

### Types

typedef Point_3<K> | Point_2;
typedef Segment_3<K>
| Segment_2;
typedef Triangle_3<K>
| Triangle_2;

The following predicates and constructor types are provided

Triangulation_euclidean_traits_xy_3<K>::Construct_segment_2
| A constructor object for Segment_2. Provides : Segment_2 operator()(Point_2 p,Point_2 q), which constructs a segment from two points.
Triangulation_euclidean_traits_xy_3<K>::Construct_triangle_2
| A constructor object for Triangle_2. Provides : Triangle_2 operator()(Point_2 p,Point_2 q,Point_2 r ), which constructs a triangle from three points.
Triangulation_euclidean_traits_xy_3<K>::Compare_x_2
| Predicate object. Provides the operator : Comparison_result operator()(Point_2 p, Point_2 q) which returns SMALLER, EQUAL or LARGER accordingto the x-ordering of points p and q.
Triangulation_euclidean_traits_xy_3<K>::Compare_y_2
| Predicate object. Provides the operator : Comparison_result operator()(Point_2 p, Point_2 q) which returns (SMALLER, EQUAL or LARGER) according to the y-ordering of points p and q.
Triangulation_euclidean_traits_xy_3<K>::Orientation_2
| Predicate object. Provides the operator : Orientation operator()(Point_2 p, Point_2 q, Point_2 r) which returns LEFT_TURN, RIGHT_TURN or COLLINEAR according to the position of the projection of r with respect to the projection of the oriented line pq.
Triangulation_euclidean_traits_xy_3<K>::Side_of_oriented_circle_2
| Predicate object. Provides the operator : Oriented_side operator()(Point_2 p, Point_2 q, Point_2 r, Point_2 s) which takes four points p, q, r, s as arguments and returns ON_POSITIVE_SIDE, ON_NEGATIVE_SIDE or, ON_ORIENTED_BOUNDARY according to the position of the projection of points with respect to the oriented circle through the projections of p,q and r.

### Creation

Only a default constructor, copy constructor and an assignement operator are required. Note that further constructors can be provided.

Triangulation_euclidean_traits_xy_3<K> traits;
| default constructor.

Triangulation_euclidean_traits_xy_3<K> traits ( | Triangulation_euclidean_traits_xy_3 tr);

| Copy constructor.

Triangulation_euclidean_traits_xy_3
| traits = Triangulation_euclidean_traits_xy_3 tr
|  | Assignment operator.

### Access to predicate objects

The following access functions are provided

Construct_segment_2
| traits.construct_segment_2_object ()
Construct_triangle_2
| traits.construct_triangle_2_object ()
Comparison_x_2 | traits.compare_x_2_object ()
Comparison_y_2 | traits.compare_y_2_object ()
Orientation_2 | traits.orientation_2_object ()
Side_of_oriented_circle_2
| traits.side_of_oriented_circle_2_object ()

### See Also

TriangulationTraits_2
DelaunayTriangulationTraits_2
CGAL::Triangulation_2<Traits,Tds>
CGAL::Delaunay_triangulation_2<Traits,Tds>

CGAL provides also predefined geometric traits class Triangulation_euclidean_traits_yz_3<K> and Triangulation_euclidean_traits_zx_3<K> to deal with projections on the xz- or the yz-plane, respectively.

#include <CGAL/Triangulation_euclidean_traits_xz_3.h>

#include <CGAL/Triangulation_euclidean_traits_yz_3.h>