GeneralPolygon_2

Refines

GpsTraitsGeneralPolygon_2

Types

GeneralPolygon_2::X_monotone_curve_2
represents a planar (weakly) x-monotone curve. The type of the geometric mapping of the polygonal edges. It must model the concept ArrTraits::XMonotoneCurve_2.


GeneralPolygon_2::Curve_iterator
an iterator over the geometric mapping of the polygon edges. Its value type is X_monotone_curve_2.

GeneralPolygon_2::Curve_const_iterator
a const iterator over the geometric mapping of the polygon edges. Its value type is X_monotone_curve_2.

Definition

A model of this concept represents a simple general-polygon. The geometric mapping of the edges of the polygon must be x-monotone curves. The concept requires the ability to access these curves. The general polygon represented must be simple. That is, the only points of the plane belonging to two curves are the geometric mapping of the polygon vertices. In addition, the vertices of the represented polygon must be ordered consistently, and the curved must be directed accordingly. Only counterclockwise oriented polygons are valid operands of Boolean set-operations. General polygon that represent holes must be clockwise oriented.

Creation

GeneralPolygon_2 polygon;
default constructor.

GeneralPolygon_2 polygon ( other);
copy constructor.

GeneralPolygon_2 polygon = other assignment operator.
template <class InputIterator>
GeneralPolygon_2 polygon ( InputIterator begin, InputIterator end);
constructs a general polygon from a given range of curves.

Access Functions

Curve_iterator polygon.curves_begin () returns the begin iterator of the curves.
Curve_iterator polygon.curves_end () returns the past-the-end iterator of the curves.

Curve_const_iterator polygon.curves_begin () returns the begin const iterator of the curves.
Curve_const_iterator polygon.curves_end () returns the past-the-end const iterator of the curves.

Modifiers

template <class Iterator>
void polygon.init ( Iterator begin, Iterator end)
initializes the polygon with the polygonal chain given by the range. The value type of Iterator must be X_monotone_curve_2.
Precondition: The curves in the range must define a simple polygon.

Has Models

CGAL::General_polygon_2<ArrTraits>