CGAL::overlay

Definition

The function overlay computes the overlay of two input arrangement objects, and returns the overlaid arrangement. All three arrangements are instantiated using the same geometric traits class, but may be represented using different DCEL classes. A given overlay-traits object is used to properly construct the overlaid DCEL that represents the resulting arrangement.

#include <CGAL/Arr_overlay.h>

template<typename Traits, typename Dcel1, typename Dcel2, typename ResDcel, typename OverlayTraits>
void
overlay ( Arrangement_2<Traits,Dcel1> arr1,
Arrangement_2<Traits,Dcel2> arr2,
Arrangement_2<Traits,ResDcel>& res,
OverlayTraits& ovl_tr)
Computes the overlay of two arrangements arr1 and arr2, and sets the output arrangement res to represent the overlaid arrangement.

Precondition

res does not refer to either arr1 or arr2 (that is, ``self overlay'' is not supported).

#include <CGAL/Arrangement_with_history_2.h>

template<typename Traits, typename Dcel1, typename Dcel2, typename ResDcel, typename OverlayTraits>
void
overlay ( Arrangement_with_history_2<Traits,Dcel1> arr1,
Arrangement_with_history_2<Traits,Dcel2> arr2,
Arrangement_with_history_2<Traits,ResDcel>& res,
OverlayTraits& ovl_tr)
Computes the overlay of two arrangements with history arr1 and arr2, and sets the output arrangement with history res to represent the overlaid arrangement. The function also constructs a consolidated set of curves that induce res.

Precondition

res does not refer to either arr1 or arr2 (that is, ``self overlay'' is not supported).

Requirements

See Also

OverlayTraits