docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARPlaneMeshGenerator

    Generator method for ARPlane mesh geometry.

    Inheritance
    object
    ARPlaneMeshGenerator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 Mesh to write results to.

    NativeArray<Vector2> boundaryVertices

    The vertices of the planes boundary, in plane-space.

    Returns
    Type Description
    bool

    True if the mesh was generated, False otherwise.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)