TriangulationTraits_2

Definition

The concept TriangulationTraits_2 describes the set of requirements to be fulfilled by any class used to instantiate the first template parameter of the class Triangulation_2<Traits,Tds>. This concept provides the types of the geometric primitives used in the triangulation and some function object types for the required predicates on those primitives.

Types

TriangulationTraits_2::Point_2
The point type.

TriangulationTraits_2::Segment_2
The segment type.

TriangulationTraits_2::Triangle_2
The triangle type.


TriangulationTraits_2::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.

TriangulationTraits_2::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.


TriangulationTraits_2::Less_x_2
Predicate object. Provides the operator :
bool operator()(Point p, Point q)
which returns true if p is before q according to the x-ordering of points.

TriangulationTraits_2::Less_y_2
Predicate object. Provides the operator :
bool operator()(Point p, Point q)
which returns true if p is before q according to the y-ordering of points.

TriangulationTraits_2::Compare_x_2
Predicate object. Provides the operator :
Comparison_result operator()(Point p, Point q)
which returns SMALLER, EQUAL or LARGER according to the x-ordering of points p and q.

TriangulationTraits_2::Compare_y_2
Predicate object. Provides the operator :
Comparison_result operator()(Point p, Point q)
which returns (SMALLER, EQUAL or LARGER) according to the y-ordering of points p and q.

TriangulationTraits_2::Orientation_2
Predicate object. Provides the operator :
Orientation operator()(Point p, Point q, Point r)
which returns LEFT_TURN, RIGHT_TURN or COLLINEAR depending on r being, with respect to the oriented line pq, on the left side , on the right side or on the line.

TriangulationTraits_2::Side_of_oriented_circle_2
Predicate object. Must provide the operator Oriented_side operator()(Point p, Point q, Point r, Point 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 points s with respect to the oriented circle through through p,q and r. This type is required only if the function side_of_oriented_circle(Face_handle f, Point p) is called.

TriangulationTraits_2::Construct_circumcenter_2
Constructor object. Provides the operator :
Point operator()(Point p, Point q, Point r)
which returns the circumcenter of the three points p, q and r. This type is required only if the function Point circumcenter(Face_handle f)is called.

Creation

Only a default constructor, copy constructor and an assignment operator are required. Note that further constructors can be provided.
TriangulationTraits_2 traits;
default constructor.

TriangulationTraits_2 traits ( gtr);
Copy constructor

TriangulationTraits_2 traits = gtr Assignment operator.

Predicate functions

The following functions give access to the predicate and constructor objects.
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 ()
Required only if side_of_oriented_circle is called called.
Construct_circumcenter_2 traits.construct_circumcenter_2_object ()
Required only if circumcenter is called.

Has Models

All the Cgal Kernels
CGAL::Triangulation_euclidean_traits_2<K>
CGAL::Projection_traits_xy_3<K>
CGAL::Projection_traits_yz_3<K>
CGAL::Projection_traits_zx_3<K>
CGAL::Triangulation_euclidean_traits_xy_3<K>,
CGAL::Triangulation_euclidean_traits_yz_3<K>,
CGAL::Triangulation_euclidean_traits_zx_3<K>.

See Also

CGAL::Triangulation_2<Traits,Tds>