Class ARPlaneMeshGenerator
Generator method for ARPlane mesh geometry.
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
public static class ARPlaneMeshGenerator
Methods
TryGenerateMesh(Mesh, NativeArray<Vector2>)
Generates a Mesh
from the given parameters. The boundaryVertices
is assumed to be a simple polygon. The algorithm uses the ear clipping algorithm with O(n) time complexity for convex polygons and O(n * m) for concave polygons where n is the total number vertices and m is the number of reflex vertices. The space complexity is O(n), scaling linearly with the number of boundary vertices.
Declaration
public static bool TryGenerateMesh(Mesh mesh, NativeArray<Vector2> boundaryVertices)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The |
NativeArray<Vector2> | boundaryVertices | The vertices of the planes boundary, in plane-space. |
Returns
Type | Description |
---|---|
bool |
|