\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.12.2 - 2D Polygons
GeneralPolygonWithHoles_2 Concept Reference

Definition

Refines:

DefaultConstructible

CopyConstructible

Assignable

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.

Has Models:

CGAL::General_polygon_with_holes_2<General_polygon>

CGAL::Polygon_with_holes_2<Kernel,Container>

Types

typedef unspecified_type General_polygon_2
 the general-polygon type used to represent the outer boundary and each hole.
 
typedef unspecified_type Hole_const_iterator
 a bidirectional iterator over the polygonal holes. More...
 

Creation

template<class InputIterator >
 GeneralPolygonWithHoles_2 (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. More...
 

Predicates

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

Access Functions

const General_polygon_2outer_boundary () const
 returns the general polygon that represents the outer boundary. More...
 
Hole_const_iterator holes_begin () const
 returns the begin iterator of the holes.
 
Hole_const_iterator holes_end () const
 returns the past-the-end iterator of the holes.
 

Member Typedef Documentation

◆ Hole_const_iterator

a bidirectional iterator over the polygonal holes.

Its value type is General_polygon_2.

Constructor & Destructor Documentation

◆ GeneralPolygonWithHoles_2()

template<class InputIterator >
GeneralPolygonWithHoles_2::GeneralPolygonWithHoles_2 ( 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.

Member Function Documentation

◆ outer_boundary()

const General_polygon_2& GeneralPolygonWithHoles_2::outer_boundary ( ) const

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.