The function is_simple_2 computes if a polygon is simple, that is, if the edges do not intersect, except consecutive edges in their common vertex.
#include <CGAL/Polygon_2_algorithms.h>
| ||
|
|
The simplicity test is implemented by means of a plane sweep algorithm. The algorithm is quite robust when used with inexact number types. The running time is O(n log n), where n is the number of vertices of the polygon.
PolygonTraits_2
CGAL::Polygon_2<PolygonTraits_2, Container>