Function

CGAL::join

Definition

#include <CGAL/Boolean_set_operations_2.h>

bool join ( Type1 p1, Type2 p2, General_polygon_with_holes_2 & p)
Each one of these functions computes the union of two given polygons p1 and p2. If the two given polygons overlap, it returns true, and places the resulting polygon in p. Otherwise, it returns false.

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>
bool
join ( Polygon_2<Kernel, Container> p1,
Polygon_2<Kernel, Container> p2,
General_polygon_with_holes_2<Polygon_2<Kernel, Container> > & p)
template <class Kernel, class Container>
bool
join ( Polygon_2<Kernel, Container> p1,
Polygon_with_holes_2<Kernel,Container> p2,
General_polygon_with_holes_2<Polygon_2<Kernel, Container> > & p)
template <class Kernel, class Container>
bool
join ( Polygon_with_holes_2<Kernel, Container> p2,
Polygon_2<Kernel, Container> p1,
General_polygon_with_holes_2<Polygon_2<Kernel, Container> > & p)
template <class Kernel, class Container>
bool
join ( Polygon_with_holes_2<Kernel, Container> p2,
Polygon_with_holes_2<Kernel, Container> p1,
General_polygon_with_holes_2<Polygon_2<Kernel, Container> > & p)
template <class Traits>
bool
join ( General_polygon_2<Traits> p1,
General_polygon_2<Traits> p2,
General_polygon_with_holes_2<General_polygon_2<Traits> > & p)
template <class Traits>
bool
join ( General_polygon_2<Traits> p1,
General_polygon_with_holes_2<General_polygon_2<Traits> > p2,
General_polygon_with_holes_2<General_polygon_2<Traits> > & p)
template <class Traits>
bool
join ( General_polygon_with_holes_2<General_polygon_2<Traits> > p2,
General_polygon_2<Traits> p1,
General_polygon_with_holes_2<General_polygon_2<Traits> > & p)
template <class Polygon>
bool
join ( General_polygon_with_holes_2<Polygon> p1,
General_polygon_with_holes_2<Polygon> p2,
Traits::Polygon_with_holes_2 & p)

template <class InputIterator, class OutputIterator>
OutputIterator join ( InputIterator begin, InputIterator end, OutputIterator oi)
Computes the union of the general polygons (or general polygons with holes) in the given range. (The value type of the input iterator is used to distinguish between the two.) The result, represented by a set of general polygon with holes, is inserted into an output container through a given output iterator oi. The output iterator is returned. The value type of the OutputIterator is Traits::Polygon_with_holes_2.

template <class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator
join ( InputIterator1 pgn_begin1,
InputIterator1 pgn_end1,
InputIterator2 pgn_begin2,
InputIterator2 pgn_end2,
OutputIterator oi)
Computes the union of the general polygons and general polygons with holes in the given two ranges. The result, represented by a set of general polygon with holes, is inserted into an output container through a given output iterator oi. The output iterator is returned. The value type of the OutputIterator is Traits::Polygon_with_holes_2.

See Also

CGAL::do_intersect
CGAL::intersection
CGAL::difference
CGAL::symmetric_difference