I have a set of polygons and I want to test intersection between it and a segment.
I checked the manual but I cannot find a matching function.
The intersection between points, lines, segments, triangles, planes do exist.
And the intersection between polygons are also there.
My question is:
- Is there such a function?
- If not, does it mean I need to break down the polygons into segments and do intersection among these segments? (The reason that I am reluctant to do this is, I thought CGAL might in fact use this way to do intersections between polygons. How come there is no such a function for intersecting a line and a polygon?) Or is there any other better way to do it?
The easiest method is to create a Polygon_set_2 object which may contain several polygons. To test an intersection of an external polygon with this set you simply apply the do_intersect method.
For example:
More on polygon_set_2:
I hope it’s clear,
Kiril