Concept

GeneralPolygonSetTraits_2

Definition

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.

Refines

ArrangementDirectionalXMonotoneTraits_2

Types

GeneralPolygonSetTraits_2::Polygon_2
represents a general polygon. Must be a model of the GpsTraitsGeneralPolygon_2 concept.

GeneralPolygonSetTraits_2::Polygon_with_holes_2
represents a general polygon with holes. Must be a model of the GpsTraitsGeneralPolygonWithHoles_2 concept.


GeneralPolygonSetTraits_2::Curve_const_iterator
A const iterator of curves. Its value type is const X_monotone_curve_2.

Functor Types

GeneralPolygonSetTraits_2::Construct_polygon_2
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.


GeneralPolygonSetTraits_2::Construct_general_polygon_with_holes_2
a functor that constructs a general polygon with holes from a general polygon and, optionally, a range of holes. It uses the operator
void operator() (const General_polygon_2& pgn_boundary) or
void operator() (const General_polygon_2& pgn_boundary, HolesInputIterator h_begin, HolesInputIterator h_end) parameterized by the HolesInputIterator type.


GeneralPolygonSetTraits_2::Construct_outer_boundary
A functor for constructing the outer boundary of a polygon with holes. It uses the operator
General_polygon_2 operator()(const General_polygon_with_holes_2& pol_wh).


GeneralPolygonSetTraits_2::Construct_holes
A functor for constructing the container of holes of a polygon with holes. It returns the begin/end iterators for the holes It uses the operator
std::pair<Hole_const_iterator, Hole_const_iterator> operator()(const General_polygon_with_holes_2& pol_wh).


GeneralPolygonSetTraits_2::Is_unbounded
A functor for checking if polygon with holes has no outer boundary. It uses the operator
bool operator()(const General_polygon_with_holes_2& pol_wh).

Creation

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.

Construct_general_polygon_with_holes_2
traits.construct_polygon_with_holes_2_object () const
returns a functor that constructs a polygon with holes.

Construct_outer_boundary traits.construct_outer_boundary_object () const
returns a functor that obtains the outer boundary of a polygon with holes.

Construct_holes traits.construct_holes_object () const
returns a functor that obtains begin/end iterators over a container of holes.

Is_unbounded traits.construct_is_unbounded_object ()
returns a functor that determines if the polygon with holes is unbounded

Has Models

CGAL::Gps_segment_traits_2<Kernel,Container,ArrSegmentTraits>
CGAL::Gps_circle_segment_traits_2<Kernel>
CGAL::Gps_traits_2<ArrTraits,GeneralPolygon>

See Also

ArrangementDirectionalXMonotoneTraits_2