CGAL::difference

Definition

#include <CGAL/Boolean_set_operations_2.h>

OutputIterator difference ( Type1 p1, Type2 p2, OutputIterator oi)
Each one of these functions computes the difference between two given polygons p1 and p2, and inserts the resulting polygons with holes into an output container through the output iterator oi. The value type of the OutputIterator is either Polygon_with_holes_2 or General_polygon_with_holes_2.

Arg 1 typeArg 2 type
Polygon_2Polygon_2
Polygon_2Polygon_with_holes_2
Polygon_with_holes_2Polygon_2
Polygon_with_holes_2Polygon_with_holes_2
General_polygon_2General_polygon_2
General_polygon_2General_polygon_with_holes_2
General_polygon_with_holes_2General_polygon_2
General_polygon_with_holes_2General_polygon_with_holes_2

template <class Kernel, class Container, class OutputIterator>
OutputIterator difference ( Polygon_2<Kernel, Container> p1, Polygon_2<Kernel, Container> p2, OutputIterator oi)
template <class Kernel, class Container, class OutputIterator>
OutputIterator
difference ( Polygon_2<Kernel, Container> p1,
Polygon_with_holes_2<Kernel,Container> p2,
OutputIterator oi)
template <class Kernel, class Container, class OutputIterator>
OutputIterator
difference ( Polygon_with_holes_2<Kernel, Container> p1,
Polygon_2<Kernel, Container> p2,
OutputIterator oi)
template <class Kernel, class Container, class OutputIterator>
OutputIterator
difference ( Polygon_with_holes_2<Kernel, Container> p1,
Polygon_with_holes_2<Kernel, Container> p2,
OutputIterator oi)
template <class Traits, class OutputIterator>
OutputIterator difference ( General_polygon_2<Traits> p1, General_polygon_2<Traits> p2, OutputIterator oi)
template <class Traits, class OutputIterator>
OutputIterator
difference ( General_polygon_with_holes_2<General_polygon_2<Traits> > p1,
General_polygon_2<Traits> p2,
OutputIterator oi)
template <class Traits, class OutputIterator>
OutputIterator
difference ( General_polygon_2<Traits> p1,
General_polygon_with_holes_2<General_polygon_2<Traits> > p2,
OutputIterator oi)
template <class Polygon, class OutputIterator>
OutputIterator difference ( General_polygon_with_holes_2<Polygon> p1, General_polygon_with_holes_2<Polygon> p2)

See Also

CGAL::do_intersect
CGAL::intersection
CGAL::join
CGAL::symmetric_difference