CGAL 4.7 - 2D Arrangements
|
#include <CGAL/Arr_polyline_traits_2.h>
The X_monotone_curve_2
class nested within the polyline traits is used to represent \( x\)-monotone piecewise linear curves.
It inherits from the Curve_2
type. X_monotone_curve_2
can be constructed just like Curve_2
. However, there is precondition (which is not tested) that the input defines an \( x\)-monotone polyline. Furthermore, in contrast to the general Curve_2
type, in this case, the segments that an X_monotone_curve_2
comprises have to be instances of the type SegmentTraits_2::X_monotone_curve_2
. Note that the \( x\)-monotonicity ensures that an \( x\)-monotone polyline is not self-intersecting. (A self-intersecting polyline is subdivided into several interior-disjoint \(x\)-monotone subcurves).
The defined \( x\)-monotone polyline can be directed either from right-to-left (and in turn its vertices are stored in an ascending lexicographical \( xy\)-order) or left-to-right (and in this case the vertices are stored in a descending lexicographical \( xy\)-order).