任意简单多边形求差集(difference)
在日常开发中会遇到从一个多边形扣除掉部分区域的需求,如下图所示:
CGAL提供了CGAL::difference函数用于实现多边形差集的功能。函数原型如下:
其中type1和type2支持的类型如下:
Type1Type2Polygon_2Polygon_2Polygon_2Polygon_with_holes_2Polygon_with_holes_2Polygon_2Polygon_with_holes_2Polygon_with_holes_2General_polygon_2General_polygon_2General_polygon_2General[……]
Read More