CGAL 6.1 - 2D Arrangements

Loading...
Searching...
No Matches
List of all members
AosTraits::Intersect_2 Concept Reference
Reference Manual » Concepts » Function Object Concepts

## Definition

Refines
  `Functor`

Has models
  `AosXMonotoneTraits_2::Intersect_2`

## Operations
A model of this concept must provide:
template<typename OutputIterator >
OutputIterator | operator() (AosTraits::X_monotone_curve_2 xc1, AosTraits::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 AosTraits::Intersect_2::operator() | ( | AosTraits::X_monotone_curve_2 | xc1,
|  | AosTraits::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

  xc1 | The first \(x\)-monotone curve.
  xc2 | The second \(x\)-monotone curve.
  oi | The 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,AosXMonotoneTraits_2::Multiplicity,X_monotone_curve_2>>`, where `Point_2` is a model of `AosTraits::Point_2` and `X_monotone_curve_2` is a model of `AosTraits::XMonotoneCurve_2`.