CGAL::overlay

#include <CGAL/Arr_overlay.h>

template<class Traits, class Dcel1, class Dcel2, class RedDcel, class 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 input arrangement instances arr1 and arr2 and sets the output arrangement res to represent the overlaid arrangement. All three arrangements are instantiated using the same geometric traits class, but may be represented using different DCEL classes. In order to properly construct the overlaid DCEL that represents res, the function uses the overlay-traits object ovl_tr, which should be a model of the OverlayTraits concept, which is able to construct records of the ResDcel class on the basis of the Dcel1 and Dcel2 records that induce them.
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<class Traits, class Dcel1, class Dcel2, class RedDcel, class OverlayTraits>
void
overlay ( Arrangement_with_history_2<Traits,Dcel1> arr1,
Arrangement_with_history_2<Traits,Dcel2> arr2,
Arrangement_2<Traits,ResDcel>& res,
OverlayTraits ovl_tr)
Computes the overlay of two input arrangement-with-history instances arr1 and arr2 and sets the output arrangement res to represent the overlaid arrangement. All three arrangements are instantiated using the same geometric traits class, but may be represented using different DCEL classes. In order to properly construct the overlaid DCEL that represents res, the function uses the overlay-traits object ovl_tr, which should be a model of the OverlayTraits concept, which is able to construct records of the ResDcel class on the basis of the Dcel1 and Dcel2 records that induce them. The function also constructs a consolidated set of curves that induce res.

See Also

OverlayTraits