Class ARPlaneMeshVisualizer | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ARPlaneMeshVisualizer

    Generates a mesh for an ARPlane.

    Inheritance
    System.Object
    ARPlaneMeshVisualizer
    Namespace: UnityEngine.XR.ARFoundation
    Syntax
    public sealed class ARPlaneMeshVisualizer : MonoBehaviour
    Remarks

    If this GameObject has a MeshFilter and/or MeshCollider, this component will generate a mesh from the underlying BoundedPlane.

    It will also update a LineRenderer with the boundary points, if present.

    Properties

    mesh

    Get the Mesh that this visualizer creates and manages.

    Declaration
    public Mesh mesh { get; }
    Property Value
    Type Description
    Mesh

    Methods

    GenerateMesh(Mesh, Vector3, Vector3, List<Vector3>, Single)

    Generates a Mesh from the given parameters. The convexPolygon is assumed to be convex.

    Declaration
    public static void GenerateMesh(Mesh mesh, Vector3 center, Vector3 normal, List<Vector3> convexPolygon, float areaTolerance = 1E-06F)
    Parameters
    Type Name Description
    Mesh mesh

    The Mesh to write results to.

    Vector3 center

    The plane's center, in plane-space.

    Vector3 normal

    The plane's normal, in plane-space.

    List<Vector3> convexPolygon

    The vertices of the plane's boundary, in plane-space.

    System.Single 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.

    Remarks

    convexPolygon is not checked for its convexness. Concave polygons will produce incorrect results.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023