ConstrainedTriangulationTraits_2

Definition

The concept ConstrainedTriangulationTraits_2 defines the requirements for the geometric traits class of a constrained triangulation ( Constrained_Triangulation_2<Traits,Tds,Itag>) that supports intersections of input constraints (i. e. when the template parameter Itag is instantiated by one of the tag classes Exact_intersections_tag or Exact_predicates_tag). This concept refines the concept TriangulationTraits_2, adding requirements for function objects to compute the intersection points of two constraints. When Exact_predicates_tag is used, the traits class is also required to provide additional types to compute the squared distance between a point and a line

Refines

TriangulationTraits_2

Types

ConstrainedTriangulationTraits_2::Intersect_2
A function object whose operator() computes the intersection of two segments :
Object_2 operator()(Segment_2 s1, Segment_2 s2); Returns the intersection of s1 and s2.

When the constrained triangulation is instantiated with the intersection tag Exact_predicates_tag, the used algorithm needs to be able to compare some distances between points and lines and the following types are further required.

ConstrainedTriangulationTraits_2::RT
A number type supporting the comparison operator <.


ConstrainedTriangulationTraits_2::Line_2
The line type.

ConstrainedTriangulationTraits_2::Construct_line_2
A function object whose operator() constructs a line from two points :
Line_2 operator()(Point_2 p1, Point_2 p2).

ConstrainedTriangulationTraits_2::Compute_squared_distance_2
A function object with an operator() designed to compute the squared distance between a line and a point :
RT operator()(Line_2 l, Point_2 p); Return the squared distance between p and l.

Access to constructor object

Intersect_2 traits.intersect_2_object ()

Construct_line_2 traits.construct_line_2_object ()
required when the intersection tag is Exact_predicates_tag.

Compute_squared_distance_2 traits.compute_squared_distance_2_object ()
required when the intersection tag is Exact_predicates_tag.

Has Models

The kernels of Cgal are models for this traits class.
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

TriangulationTraits_2
ConstrainedDelaunayTriangulationTraits_2
CGAL:Constrained_Triangulation_2<Traits,Tds,Itag>