#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <list>
typedef std::list<Polygon_with_holes_2> Pwh_list_2;
#include "print_utils.h"
int main ()
{
Polygon_2 outP;
Polygon_2 holesP[1];
outP.push_back (Point_2 (-3, -5)); outP.push_back (Point_2 (3, -5));
outP.push_back (Point_2 (3, 5)); outP.push_back (Point_2 (-3, 5));
holesP[0].push_back (Point_2 (-1, -3));
holesP[0].push_back (Point_2 (-1, 3));
holesP[0].push_back (Point_2 (1, 3));
holesP[0].push_back (Point_2 (1, -3));
Polygon_with_holes_2 P (outP, holesP, holesP + 1);
std::cout << "P = "; print_polygon_with_holes (P);
Polygon_2 outQ;
Polygon_2 holesQ[1];
outQ.push_back (Point_2 (-5, -3)); outQ.push_back (Point_2 (5, -3));
outQ.push_back (Point_2 (5, 3)); outQ.push_back (Point_2 (-5, 3));
holesQ[0].push_back (Point_2 (-3, -1));
holesQ[0].push_back (Point_2 (-3, 1));
holesQ[0].push_back (Point_2 (3, 1));
holesQ[0].push_back (Point_2 (3, -1));
Polygon_with_holes_2 Q (outQ, holesQ, holesQ + 1);
std::cout << "Q = "; print_polygon_with_holes (Q);
Pwh_list_2 symmR;
Pwh_list_2::const_iterator it;
std::cout << "The symmetric difference:" << std::endl;
for (it = symmR.begin(); it != symmR.end(); ++it) {
std::cout << "--> ";
print_polygon_with_holes (*it);
}
return 0;
}