Method Triangulate
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Triangulate()
Breaks the polygon into triangles.
public GeoTriangle3[] Triangulate()
Returns
- GeoTriangle3[]
The triangles covering the polygon, sharing its orientation.
Remarks
The polygon is fanned from its first vertex. For a convex polygon this covers it exactly. For
a concave one, some triangles reach outside the boundary and others overlap them with the
opposite winding, so the signed contributions still cancel to the right total: area, centroid
and volume come out correct. What a fan does not give is a set of triangles each of which lies
inside the polygon, so it is not the right basis for a point-in-polygon test, and
Containment3 uses a winding count instead.