CGAL 5.6 - 2D Arrangements
Loading...
Searching...
No Matches
ArrTraits::Intersect_2 Concept Reference

Definition

Operations

A model of this concept must provide:

template<typename OutputIterator >
OutputIterator operator() (ArrTraits::X_monotone_curve_2 xc1, ArrTraits::X_monotone_curve_2 xc2, OutputIterator &oi)
 computes the intersections of xc1 and xc2 and writes them in an ascending lexicographic \(xy\)-order into a range beginning at oi.
 

Member Function Documentation

◆ operator()()

template<typename OutputIterator >
OutputIterator ArrTraits::Intersect_2::operator() ( ArrTraits::X_monotone_curve_2  xc1,
ArrTraits::X_monotone_curve_2  xc2,
OutputIterator oi 
)

computes the intersections of xc1 and xc2 and writes them in an ascending lexicographic \(xy\)-order into a range beginning at oi.

The type OutputIterator must dereference a polymorphic object of type boost::variant that wraps objects of type either type pair<ArrTraits::Point_2, ArrTraits::Multiplicity> or ArrTraits::X_monotone_curve_2. An object of the former type represents an intersection point with its multiplicity (in case the multiplicity is undefined or unknown, it should be set to \(0\)). An object of the latter type represents an overlapping subcurve of xc1 and xc2. The operator returns a past-the-end iterator of the destination range.

A special case may occur when the parameter space of the surface, the arrangement is embedded on, is identified on the left and right sides of the boundary. An intersection point that lies on the identification curve, between two \(x\)-monotone curves that intersect at their left and right ends must be ignored. Consider two \(x\)-monotone curves that intersect at their left and right ends, respectively, at a point \(p\) that lies on the identification curve. If, for example, the number of intersections between these two curves is greater than 1, the order of intersections is non-deterministic.