This concept defines the minimal set of geometric predicates needed to perform the Boolean-set operations. It refines the directional x-monotone arrangement-traits concept. In addition to the Point_2 and X_monotone_curve_2 types defined in the generalized concept, it defines a type that represents a general polygon and another one that represents general polygon with holes. It also requires operations that operate on these types.




represents a general polygon.

represents a general polygon with holes.

A const iterator of curves. Its value type is const X_monotone_curve_2.

Functor Types

a functor that constructs a general polygon from a range of x-monotone curves. It uses the operator
void operator() (InputIterator begin, Input iterator end, Polygon_2 & pgn),
parameterized by the InputIterator type.

a functor that returns a pair that consists of the begin and past-the-end iterators of the x monotone curves of the boundary of a given general polygon. It uses the operator
std:pair<Curve_const_iterator, Curve_const_iterator> operator() (const Polygon_2 & pgn).

provides the operators :
bool operator() (Polygon_2 & pgn)
which returns true if the pgn is valid, and false otherwise;
and :
bool operator() (Polygon_with_holes_2 & pgn_with_holes)
which returns true if pgn_with_holes is valid, and false otherwise. A polygon of type Polygon_2 is valid, if it is strictly simple and oriented counterclockwise. A polygon of type Polygon_with_holes_2 is valid, if its outer boundary is simple and oriented counterclockwise, and each one of its holes is a strictly simple polygon that oriented clockwise, contained inside its outer boundary, and they are all together pairwise disjoint, except perhaps at the vertices.
This functionality is used to verify precondition of some of the operations.


GeneralPolygonSetTraits_2 traits;
default constructor.

GeneralPolygonSetTraits_2 traits ( other);
copy constructor

GeneralPolygonSetTraits_2 traits = other assignment operator.

Accessing Functor Objects

Construct_polygon_2 traits.construct_polygon_2_object ()
returns a functor that constructs a polygon.

Construct_curves_2 traits.construct_curves_2_object ()
returns a functor that obtains the curves of a polygon.

Is_valid_2 traits.is_valid_2_object () returns a functor that checks the validity of a polygon.

Has Models


See Also