Method TessellatePath
TessellatePath(BezierContour, PathProperties, TessellationOptions, out Vector2[], out ushort[])
Tessellates a path.
Declaration
public static void TessellatePath(BezierContour contour, PathProperties pathProps, VectorUtils.TessellationOptions tessellateOptions, out Vector2[] vertices, out ushort[] indices)
Parameters
Type | Name | Description |
---|---|---|
BezierContour | contour | The path to tessellate |
PathProperties | pathProps | The path properties |
VectorUtils.TessellationOptions | tessellateOptions | The tessellation options |
Vector2[] | vertices | The resulting vertices |
ushort[] | indices | The resulting triangles |
Remarks
The individual line segments generated during tessellation are made out of a set of ordered vertices. It is important to honor this ordering so joining and and capping connect properly with the existing vertices without generating dupes. The ordering assumed is as follows: The last two vertices of a piece must be such that the first is generated at the end with a positive half-thickness while the second vertex is at the end too but at a negative half-thickness. No assumptions are enforced for other vertices before the two last vertices.