\( \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.6.1 - 2D Regularized Boolean Set-Operations
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

The complement function is overloaded. Depending on the type of polygon pgn the complement is either a single (general) polygon with holes, or several (general) poylgons with holes. In the latter case the complement function writes them into an output iterator oi.

Parameters
pgnThe input polygon for the complement function. It may be of the type Polygon_2, General_polygon_2, Polygon_with_holes_2, or General_polygon_with_holes_2.
See Also
CGAL::do_intersect()
CGAL::intersection()
CGAL::join()
CGAL::difference()
CGAL::symmetric_difference()

Functions

template<class Kernel , class Container >
void CGAL::complement (const Polygon_2< Kernel, Container > &pgn, Polygon_with_holes_2< Kernel, Container > &res)
 writes the complement of the polygon pgn into the polygon with holes res.
 
template<class Traits >
void CGAL::complement (const General_polygon_2< Traits > &pgn, General_polygon_with_holes_2< Traits > &res)
 writes the complement of the general polygon pgn into the general polygon with holes res.
 
template<class Traits , class OutputIterator >
OutputIterator CGAL::complement (const Polygon_with_holes_2< Kernel, Container > &pgn, OutputIterator oi)
 writes the complement of the polygon with holes pgn into the output iterator oi. More...
 
template<class Traits , class OutputIterator >
OutputIterator CGAL::complement (const General_polygon_with_holes_2< General_polygon_2< Traits > > &pgn, OutputIterator oi)
 writes the complement of the general polygon with holes pgn into the output iterator oi. More...
 

Function Documentation

template<class Traits , class OutputIterator >
OutputIterator CGAL::complement ( const Polygon_with_holes_2< Kernel, Container > &  pgn,
OutputIterator  oi 
)

writes the complement of the polygon with holes pgn into the output iterator oi.

The value type of oi is Polygon_with_holes_2.

#include <CGAL/Boolean_set_operations_2.h>

template<class Traits , class OutputIterator >
OutputIterator CGAL::complement ( const General_polygon_with_holes_2< General_polygon_2< Traits > > &  pgn,
OutputIterator  oi 
)

writes the complement of the general polygon with holes pgn into the output iterator oi.

The value type of oi is General_polygon_with_holes_2.

#include <CGAL/Boolean_set_operations_2.h>