Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TessellatePath(BezierContour, PathProperties, TessellationOptions, out Vector2[], out ushort[])

Tessellates a path.
Read time 1 minuteLast updated 11 days ago

Definition

TessellatePath(BezierContour, PathProperties, TessellationOptions, Vector2[], ushort[])

public static void TessellatePath(BezierContour contour, PathProperties pathProps, VectorUtils.TessellationOptions tessellateOptions, out Vector2[] vertices, out ushort[] indices)

Parameters

The path to tessellate

The path properties

tessellateOptions

The tessellation options

vertices

The resulting vertices

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.