docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrSpatialBounded2DDataEXT

    The bounded 2D component. Provided by XR_EXT_spatial_entity.

    Implements
    IEquatable<XrSpatialBounded2DDataEXT>
    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 XrSpatialBounded2DDataEXT : IEquatable<XrSpatialBounded2DDataEXT>

    Constructors

    XrSpatialBounded2DDataEXT(XrPosef, XrExtent2Df)

    Construct an instance.

    Declaration
    public XrSpatialBounded2DDataEXT(XrPosef center, XrExtent2Df extents)
    Parameters
    Type Name Description
    XrPosef center

    The center.

    XrExtent2Df extents

    The extents.

    Properties

    center

    The geometric center of the bounded 2D component.

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

    extents

    The extents of the bounded 2D component along the x-axis (extents.width), and y-axis (extents.height), centered on center.

    Declaration
    public XrExtent2Df extents { get; }
    Property Value
    Type Description
    XrExtent2Df
    Remarks

    The extents refer to the entity’s size in the x-y plane of the plane’s coordinate system. A plane with a position of {0, 0, 0}, rotation of {0, 0, 0, 1} (no rotation), and an extent of {1, 1} refers to a 1 meter x 1 meter plane centered at {0, 0, 0} with its front face normal vector pointing towards the +Z direction in the component’s space.

    Methods

    Equals(object)

    Compares for equality. Two instances are equal if their bits are exactly identical for the center and extents properties.

    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 XrSpatialBounded2DDataEXT and equal to this instance. Otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(XrSpatialBounded2DDataEXT)

    Compares for equality. Two instances are equal if their bits are exactly identical for the center and extents properties.

    Declaration
    public bool Equals(XrSpatialBounded2DDataEXT other)
    Parameters
    Type Name Description
    XrSpatialBounded2DDataEXT 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)