GeneralPolygonWithHoles_2

Refines

GpsTraitsGeneralPolygonWithHoles_2

Types

GeneralPolygonWithHoles_2::General_polygon_2
the general-polygon type used to represent the outer boundary and each hole. Must Model the GeneralPolygon_2 Concept.


GeneralPolygonWithHoles_2::Hole_const_iterator
a bidirectional iterator over the polygonal holes. Its value type is General_polygon_2.

Definition

A model of this concept represents a general polygon with holes. The concept requires the ability to access the general polygon that represents the outer boundary and the general polygons that represent the holes.

Creation

GeneralPolygonWithHoles_2 polygon;
default constructor.

GeneralPolygonWithHoles_2 polygon ( other);
copy constructor.

GeneralPolygonWithHoles_2 polygon = other assignment operator.

GeneralPolygonWithHoles_2 polygon ( General_polygon_2 & outer);
constructs a general polygon with holes that has no holes using a given general polygon outer as the outer boundary.


template <class InputIterator>
GeneralPolygonWithHoles_2 polygon ( General_polygon_2 & outer, InputIterator begin, InputIterator end);
constructs a general polygon with holes using a given general polygon outer as the outer boundary and a given range of holes. If outer is an empty general polygon, then an unbounded polygon with holes will be created. The holes must be contained inside the outer boundary, and the polygons representing the holes must be simple and pairwise disjoint, except perhaps at the vertices.

Predicates

bool polygon.is_unbounded () returns true if the outer boundary is empty, and false otherwise.

Access Functions

General_polygon_2 polygon.outer_boundary () returns the general polygon that represents the outer boundary. Note that this polygon is not necessarily a valid (simple) general polygon because it may be relatively simple.

Hole_const_iterator polygon.holes_begin () returns the begin iterator of the holes.
Hole_const_iterator polygon.holes_end () returns the past-the-end iterator of the holes.

Has Models

CGAL::General_polygon_with_holes_2<General_polygon>
CGAL::Polygon_with_holes_2<Kernel,Container>
CGAL::Gps_circle_segment_traits_2<Kernel>::Polygon_with_holes_2
CGAL::Gps_traits_2<ArrTraits,GeneralPolygon>::Polygon_with_holes_2