docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrBoxf

    Represents a 3D bounding box. Provided by XR_VERSION_1_1.

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

    Constructors

    XrBoxf(XrPosef, XrExtent3Df)

    Construct an instance.

    Declaration
    public XrBoxf(XrPosef center, XrExtent3Df extents)
    Parameters
    Type Name Description
    XrPosef center

    The center.

    XrExtent3Df extents

    The extents.

    Properties

    center

    The pose defining the center position and orientation of the bounding box within the reference frame of the corresponding XrSpace.

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

    extents

    The edge-to-edge length of the box along each dimension with center as the center.

    Declaration
    public XrExtent3Df extents { get; }
    Property Value
    Type Description
    XrExtent3Df

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

    Overrides
    ValueType.Equals(object)

    Equals(XrBoxf)

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

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