API reference

Triangulator Class

Provides methods for triangulating polygons and clipping polygons with holes.

Static Methods

TriangulatePoints ( vertices , holes , outVertices , outIndices )
Triangulates a set of points using the ear clipping algorithm.
Signature
static unsafe void TriangulatePoints(List< Vector2 > vertices, List< List< Vector2 > > holes, out Vector2[] outVertices, out int[] outIndices)
Parameters
vertices: List< Vector2 >  The list of vertices that define the outline of a polygon to triangulate.
holes: List< List< Vector2 > >  The list of internal polygon holes that should not be triangulated.
outVertices: out Vector2[]  The list of vertices created from the triangulation.
outIndices: out int[]  The list of indices created from the triangulation.
Returns
unsafe void