#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/Polygon_set_2.h>
#include <CGAL/draw_polygon_set_2.h>
Polygon_2 rectangle(int l)
{
Polygon_2 P;
P.push_back(Point_2(-l,-l));
P.push_back(Point_2(l,-l));
P.push_back(Point_2(l,l));
P.push_back(Point_2(-l,l));
return P;
}
int main()
{
Polygon_with_holes_2 A(rectangle(3));
Polygon_2 H(rectangle(2));
H.reverse_orientation();
A.add_hole(H);
Polygon_2 B(rectangle(1));
Polygon_set_2 S;
S.insert(A);
S.insert(B);
return 0;
}
The class Polygon_set_2 represents sets of linear polygons with holes.
Definition: Polygon_set_2.h:26
void draw(const Arrangement_2< GeometryTraits_2, Dcel > &arr, const GSOptions &gso)