ArrangementXMonotoneTraits_2

Definition

This concept refines the basic arrangement-traits concept. A model of this concept is able to handle x-monotone curves that intersect in their interior (and points that conincide with curve interiors). This is necessary for constructing arrangements of sets of intersecting x-monotone curves.

As the resulting structure, represented by the Arrangement_2 class, stores pairwise interior-disjoint curves, the input curves are split at the intersection points before being inserted into the arrangement. A model of this refined concept therefore needs to compute the intersections (and possibly overlaps) between two x-monotone curves and to support curve splitting. The reverse merge operation is optionally supported.

Refines

ArrangementBasicTraits_2

Tags

ArrangementXMonotoneTraits_2::Has_merge_category
indicates whether the nested functors Are_mergeable_2 and Merge_2 are provided.

Types

ArrangementXMonotoneTraits_2::Multiplicity
the multiplicity type.

Functor Types

ArrangementXMonotoneTraits_2::Intersect_2
provides the operator (templated by the OutputIterator type) :
OutputIterator operator() (X_monotone_curve_2 c1, X_monotone_curve_2 c2, OutputIterator oi)
which computes the intersections of c1 and c2 and inserts them in an ascending lexicographic xy-order into the output iterator. The value-type of OutputIterator is CGAL::Object, where each Object either wraps a pair<Point_2,Multiplicity> instance, which represents an intersection point with its multiplicity (in case the multiplicity is undefined or not known, it should be set to 0) or an X_monotone_curve_2 instance, representing an overlapping subcurve of c1 and c2. The operator returns a past-the-end iterator for the output sequence.


ArrangementXMonotoneTraits_2::Split_2
provides the operator :
void operator() (X_monotone_curve_2 c, Point_2 p, X_monotone_curve_2& c1, X_monotone_curve_2& c2)
which accepts an input curve c and a split point p in its interior. It splits c at the split point into two subcurves c1 and c2, such that p is c1's right endpoint and c2's left endpoint.

The two following functor types are optional. If they are supported, the Has_merge_category tag should be defined as Tag_true (and Tag_false otherwise):

ArrangementXMonotoneTraits_2::Are_mergeable_2
provides the operator :
bool operator() (X_monotone_curve_2 c1, X_monotone_curve_2 c2)
which accepts two x-monotone curves c1 and c2 that share a common endpoint, and determines whether they can be merged to form a single continuous x-monotone curve.


ArrangementXMonotoneTraits_2::Merge_2
provides the operator :
void operator() (X_monotone_curve_2 c1, X_monotone_curve_2 c2, X_monotone_curve_2& c)
which accepts two mergeable x-monotone curves c1 and c2 (see above), and sets c to be the merged curve.

Creation

ArrangementXMonotoneTraits_2 traits;
default constructor.

ArrangementXMonotoneTraits_2 traits ( other);
copy constructor

ArrangementXMonotoneTraits_2
traits = other assignment operator.

Accessing Functor Objects

Intersect_2 traits.intersect_2_object ()
Split_2 traits.split_2_object ()
Are_mergeable_2 traits.are_mergeable_2_object ()
Merge_2 traits.merge_2_object ()

Has Models

CGAL::Arr_segment_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>

See Also

ArrangementBasicTraits_2