Method GenerateMesh
GenerateMesh(Mesh, Pose, NativeArray<Vector2>, float)
Generates a Mesh from the given parameters. The convexPolygon is assumed to be convex.
Declaration
public static bool GenerateMesh(Mesh mesh, Pose pose, NativeArray<Vector2> convexPolygon, float areaTolerance = 1E-06)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | mesh | The |
| Pose | pose | The session-space pose of the mesh. |
| NativeArray<Vector2> | convexPolygon | The vertices of the plane's boundary, in plane-space. |
| float | areaTolerance | If any triangle in the generated mesh is less than this, then the entire mesh is ignored. This handles an edge case which prevents degenerate or very small triangles. Units are meters-squared. |
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
convexPolygon is not checked for its convexness. Concave polygons will produce incorrect results.