Polygon triangulation. More...
Functions | |
| std::vector< ivec3 > | TriangulateIdx (const PolygonsIdx &polys, double epsilon=-1, bool allowConvex=true) |
| std::vector< ivec3 > | Triangulate (const Polygons &polygons, double epsilon, bool allowConvex) |
| Triangulates a set of ε-valid polygons. If the input is not ε-valid, the triangulation may overlap, but will always return a manifold result that matches the input edge directions. | |
Polygon triangulation.
| std::vector< ivec3 > Triangulate | ( | const Polygons & | polygons, |
| double | epsilon, | ||
| bool | allowConvex ) |
Triangulates a set of ε-valid polygons. If the input is not ε-valid, the triangulation may overlap, but will always return a manifold result that matches the input edge directions.
| polygons | The set of polygons, wound CCW and representing multiple polygons and/or holes. |
| epsilon | The value of ε, bounding the uncertainty of the input. |
| allowConvex | If true (default), the triangulator will use a fast triangulation if the input is convex, falling back to ear-clipping if not. The triangle quality may be lower, so set to false to disable this optimization. |