\( \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.8.2 - 2D Regularized Boolean Set-Operations
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Polygon_with_holes_2< Kernel, Container > Class Template Reference

#include <CGAL/Polygon_with_holes_2.h>

Definition

The class Polygon_with_holes_2 models the concept GeneralPolygonWithHoles_2.

It represents a linear polygon with holes. It is parameterized with two types (Kernel and Container) that are used to instantiate the type Polygon_2<Kernel,Container>. The latter is used to represents the outer boundary and the boundary of the holes (if any exist).

Is Model Of:
GeneralPolygonWithHoles_2
Examples:
Boolean_set_operations_2/connect_polygon.cpp, Boolean_set_operations_2/sequence.cpp, Boolean_set_operations_2/simple_join_intersect.cpp, and Boolean_set_operations_2/symmetric_difference.cpp.

Related Functions

(Note that these are not member functions.)

template<class Kernel , Class Container>
std::istream & operator>> (std::istream &in, CGAL::Polygon_with_holes_2< Kernel, Container > &P)
 This operator imports a polygon with holes from the input stream in. More...
 
template<class Polygon >
std::ostream & operator<< (std::ostream &out, CGAL::Polygon_with_holes_2< Kernel, Polygon > &P)
 This operator exports a polygon with holes to the output stream out. More...
 

Friends And Related Function Documentation

template<class Polygon >
std::ostream & operator<< ( std::ostream &  out,
CGAL::Polygon_with_holes_2< Kernel, Polygon > &  P 
)
related

This operator exports a polygon with holes to the output stream out.

An ASCII and a binary format exist. The format can be selected with the CGAL modifiers for streams, set_ascii_mode() and set_binary_mode() respectively. The modifier set_pretty_mode() can be used to allow for (a few) structuring comments in the output. Otherwise, the output would be free of comments. The default for writing is ASCII without comments.

The number of points of the outer boundary is exported followed by the points themselves in counterclockwise order. Then, the number of holes is exported, and for each hole, the number of points on its outer boundary is exported followed by the points themselves in clockwise order.

template<class Kernel , Class Container>
std::istream & operator>> ( std::istream &  in,
CGAL::Polygon_with_holes_2< Kernel, Container > &  P 
)
related

This operator imports a polygon with holes from the input stream in.

An ASCII and a binary format exist. The stream detects the format automatically and can read both.

The format consists of the number of points of the outer boundary followed by the points themselves in counterclockwise order, followed by the number of holes, and for each hole, the number of points of the outer boundary is followed by the points themselves in clockwise order.