#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Multipolygon_with_holes_2.h>
int main() {
Polygon_with_holes_2 p1(Polygon_2(p1_outer, p1_outer+4));
Polygon_2 h(p1_inner, p1_inner+4);
p1.add_hole(h);
Polygon_with_holes_2 p2(Polygon_2(p2_outer, p2_outer+4));
Multipolygon_with_holes_2 mp;
mp.add_polygon_with_holes(p1);
mp.add_polygon_with_holes(p2);
for (auto const& p: mp.polygons_with_holes()) {
std::cout << p << std::endl;
}
return 0;
}
The class Multipolygon_with_holes_2 models the concept MultipolygonWithHoles_2.
Definition: Multipolygon_with_holes_2.h:35
The class Polygon_2 implements polygons.
Definition: Polygon_2.h:65
The class Polygon_with_holes_2 models the concept GeneralPolygonWithHoles_2.
Definition: Polygon_with_holes_2.h:43