\( \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.13.2 - 2D Regularized Boolean Set-Operations

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

◆ complement() [1/2]

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

#include <CGAL/Boolean_set_operations_2.h>

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

The value type of oi is Polygon_with_holes_2.

◆ complement() [2/2]

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

#include <CGAL/Boolean_set_operations_2.h>

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.