\( \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.14.2 - 2D Polygons
CGAL::General_polygon_with_holes_2< Polygon_ > Class Template Reference

#include <CGAL/General_polygon_with_holes_2.h>

Definition

The class General_polygon_with_holes_2 models the concept GeneralPolygonWithHoles_2.

It represents a general polygon with holes. It is parameterized with a type Polygon used to define the exposed type General_polygon_2. This type represents the outer boundary of the general polygon and the outer boundaries of each hole.

Template Parameters
Polygon_must have input and output operators.
Is Model Of:
GeneralPolygonWithHoles_2

Related Functions

(Note that these are not member functions.)

template<class Polygon_ >
std::ostream & operator<< (std::ostream &os, const General_polygon_with_holes_2< Polygon_ > &p)
 This operator exports a General_polygon_with_holes_2 to the output stream out. More...
 
template<class Polygon_ >
std::istream & operator>> (std::istream &is, General_polygon_with_holes_2< Polygon_ > &p)
 This operator imports a General_polygon_with_holes_2 from the input stream in. More...
 

Definition

typedef Polygon_ General_polygon_2
 polygon without hole type
 

Friends And Related Function Documentation

◆ operator
template<class Polygon_ >
std::ostream & operator<< ( std::ostream &  os,
const General_polygon_with_holes_2< Polygon_ > &  p 
)
related

This operator exports a General_polygon_with_holes_2 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(0 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 curves of the outer boundary is exported followed by the curves themselves. Then, the number of holes is exported, and for each hole, the number of curves on its outer boundary is exported followed by the curves themselves.

◆ operator>>()

template<class Polygon_ >
std::istream & operator>> ( std::istream &  is,
General_polygon_with_holes_2< Polygon_ > &  p 
)
related

This operator imports a General_polygon_with_holes_2 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 curves of the outer boundary followed by the curves themselves, followed by the number of holes, and for each hole, the number of curves on its outer boundary is followed by the curves themselves.