ArrangementBasicTraits_2

Definition

The basic arrangement-traits concept defines the minimal set of geometric predicates needed for the constrcution and maintenance of instances of the Arrangement_2 class, as well as performing simple queries (such as point-location queries) on such arrangements.

A model of this concept must define nested Point_2 and X_monotone_curve_2 types, which represent planar points and x-monotone curves (a vertical segment is also considered to be weakly x-monotone), respectively. The x-monotone curves are assumed to be pairwise disjoint in their interiors, so they do not intersect, and their endpoints are representable as Point_2 objects.

Types

ArrangementBasicTraits_2::Point_2
represents a point on the plane.


ArrangementBasicTraits_2::X_monotone_curve_2
represents a planar (weakly) x-monotone curve.

Tags

ArrangementBasicTraits_2::Has_left_category
indicates whether the nested functor Compare_at_x_left_2 is provided.

Functor Types

ArrangementBasicTraits_2::Compare_x_2
provides the operator :
Comparison_result operator() (Point_2 p1, Point_2 p2)
which returns SMALLER, EQUAL or LARGER according to the x-ordering of points p1 and p2.


ArrangementBasicTraits_2::Compare_xy_2
provides the operator :
Comparison_result operator() (Point_2 p1, Point_2 p2)
which returns SMALLER, EQUAL, or LARGER according to the lexicographic xy-order of the points p1 and p2.


ArrangementBasicTraits_2::Construct_min_vertex_2
provides the operator :
Point_2 operator() (X_monotone_curve_2 c)
which returns the lexicographically smaller (left) endpoint of c.


ArrangementBasicTraits_2::Construct_max_vertex_2
provides the operator :
Point_2 operator() (X_monotone_curve_2 c)
which returns the lexicographically larger (right) endpoint of c.


ArrangementBasicTraits_2::Is_vertical_2
provides the operator :
bool operator() (X_monotone_curve_2 c)
which determines whether c is a vertical segment.


ArrangementBasicTraits_2::Compare_y_at_x_2
provides the operator :
Comparison_result operator() (Point_2 p, X_monotone_curve_2 c)
which compares the y-coordinates of p and the vertical projection of p on c, and returns SMALLER, EQUAL or LARGER according to the result.


ArrangementBasicTraits_2::Compare_y_at_x_left_2
provides the operator :
Comparison_result operator() (X_monotone_curve_2 c1, X_monotone_curve_2 c2, Point_2 p)
which accepts two x-monotone curves c1 and c2 that have a common right endpoint p, and returns SMALLER, EQUAL or LARGER according to the relative position of the two curves immediately to the left of p. Note that in case one of the x-monotone curves is a vertical segment (emanating downward from p), it is always considered to be below the other curve.


ArrangementBasicTraits_2::Compare_y_at_x_right_2
provides the operator :
Comparison_result operator() (X_monotone_curve_2 c1, X_monotone_curve_2 c2, Point_2 p)
which accepts two x-monotone curves c1 and c2 that have a common left endpoint p, and returns SMALLER, EQUAL or LARGER according to the relative position of the two curves immediately to the right of p. Note that in case one of the x-monotone curves is a vertical segment emanating upward from p, it is always considered to be above the other curve.


ArrangementBasicTraits_2::Equal_2
provides the operators :
bool operator() (Point_2 p1, Point_2 p2)
which determines whether p1 and p2 are geometrically equivalent; and :
bool operator() (X_monotone_curve_2 c1, X_monotone_curve_2 c2)
which determines whether c1 and c2 are geometrically equivalent (have the same graph).

Creation

ArrangementBasicTraits_2 traits;
default constructor.

ArrangementBasicTraits_2 traits ( other);
copy constructor

ArrangementBasicTraits_2
traits = other assignment operator.

Accessing Functor Objects

Compare_x_2 traits.compare_x_2_object ()
Compare_xy_2 traits.compare_xy_2_object ()
Construct_min_vertex_2
traits.construct_min_vertex_2_object ()
Construct_max_vertex_2
traits.construct_max_vertex_2_object ()
Is_vertical_2 traits.is_vertical_2_object ()
Compare_y_at_x_2 traits.compare_y_at_x_2_object ()
Compare_y_at_x_left_2
traits.compare_y_at_x_left_2_object ()
Compare_y_at_x_right_2
traits.compare_y_at_x_right_2_object ()
Equal_2 traits.equal_2_object ()

Has Models

CGAL::Arr_segment_traits_2<Kernel>
CGAL::Arr_non_caching_segment_basic_traits_2<Kernel>
CGAL::Arr_non_caching_segment_traits_2<Kernel>
CGAL::Arr_polyline_traits_2<SegmentTraits>
CGAL::Arr_circle_segment_traits_2<Kernel>
CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>
CGAL::Arr_rational_arc_traits_2<AlgKernel,NtTraits>
CGAL::Arr_curve_data_traits_2<Tr,XData,Mrg,CData,Cnv>
CGAL::Arr_consolidated_curve_data_traits_2<Traits,Data>