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

Definition

Refines
Functor
Has models
ArrangementXMonotoneTraits_2::Intersect_2

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 two \(x\)-monotone curves and inserts the result in ascending \(xy\)-lexicographic order into an output container given through an output iterator.
 

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 two \(x\)-monotone curves and inserts the result in ascending \(xy\)-lexicographic order into an output container given through an output iterator.

An intersection, if exists, is represented by a discriminated union container that holds either an intersection point along with its multiplicity or an overlapping \(x\)-monotone subcurve. If the multiplicity is undefined or unknown, it should be set to \(0\).

Parameters
xc1The first \(x\)-monotone curve.
xc2The second \(x\)-monotone curve.
oiThe output iterator that points at the output container.
Returns
The past-the-end iterator of the output container.

A special case may occur when the left and right sides of the boundary of the parameter space of the surface, the arrangement is embedded on, are identified. 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 nondeterministic.

Precondition
Dereferencing oi must yield an object of type std::optional<std::variant<std::pair<Point_2,ArrangementXMonotoneTraits_2::Multiplicity,X_monotone_curve_2>>, where Point_2 is a model of ArrTraits::Point_2 and X_monotone_curve_2 is a model of ArrTraits::XMonotoneCurve_2.