docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrSpatialPolygon2DDataEXT

    Polygon 2D component. Provided by XR_EXT_spatial_plane_tracking.

    Implements
    IEquatable<XrSpatialPolygon2DDataEXT>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.NativeTypes
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public readonly struct XrSpatialPolygon2DDataEXT : IEquatable<XrSpatialPolygon2DDataEXT>

    Constructors

    XrSpatialPolygon2DDataEXT(XrPosef, XrSpatialBufferEXT)

    Construct an instance.

    Declaration
    public XrSpatialPolygon2DDataEXT(XrPosef origin, XrSpatialBufferEXT vertexBuffer)
    Parameters
    Type Name Description
    XrPosef origin

    The origin.

    XrSpatialBufferEXT vertexBuffer

    The vertex buffer.

    Properties

    origin

    The pose defining the origin of the polygon. All vertices of the polygon are relative to this origin in the X-Y plane.

    Declaration
    public XrPosef origin { get; }
    Property Value
    Type Description
    XrPosef

    vertexBuffer

    Vertex buffer of the entity that contains this component. Vertices must be in counter-clockwise order. The polygon represented by these vertices must not be self-intersecting, and may be concave.

    Declaration
    public XrSpatialBufferEXT vertexBuffer { get; }
    Property Value
    Type Description
    XrSpatialBufferEXT

    Methods

    Equals(object)

    Compares for equality. Two instances are equal if their origin and vertexBuffer properties are exactly equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The other object.

    Returns
    Type Description
    bool

    true if obj is an XrSpatialPolygon2DDataEXT and equal to this instance. Otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(XrSpatialPolygon2DDataEXT)

    Compares for equality. Two instances are equal if their origin and vertexBuffer properties are exactly equal.

    Declaration
    public bool Equals(XrSpatialPolygon2DDataEXT other)
    Parameters
    Type Name Description
    XrSpatialPolygon2DDataEXT other

    The other instance.

    Returns
    Type Description
    bool

    true if the instances are equal, otherwise false.

    GetHashCode()

    Generates a unique hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code.

    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 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)