docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XRBoundingBox

    The session-relative data associated with a 3D bounding box.

    Implements
    ITrackable
    IEquatable<XRBoundingBox>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public struct XRBoundingBox : ITrackable, IEquatable<XRBoundingBox>

    Constructors

    XRBoundingBox(TrackableId, Pose, Vector3, TrackingState, BoundingBoxClassifications, IntPtr)

    Constructs a new instance. XRBoundingBox objects are typically created by XRBoundingBoxSubsystem.GetChanges.

    Declaration
    public XRBoundingBox(TrackableId trackableId, Pose pose, Vector3 size, TrackingState trackingState, BoundingBoxClassifications classifications, IntPtr nativePtr)
    Parameters
    Type Name Description
    TrackableId trackableId

    The TrackableId associated with the bounding box.

    Pose pose

    The pose describing the position and orientation of the bounding box.

    Vector3 size

    The dimensions of the bounding box.

    TrackingState trackingState

    The TrackingState describing how well the XR device is tracking the bounding box.

    BoundingBoxClassifications classifications

    The BoundingBoxClassification assigned to the bounding box by the XR device.

    IntPtr nativePtr

    The native pointer associated with the bounding box.

    See Also
    XRBoundingBoxSubsystem

    Properties

    classifications

    The classifications of this bounding box.

    Declaration
    public readonly BoundingBoxClassifications classifications { get; }
    Property Value
    Type Description
    BoundingBoxClassifications
    See Also
    XRBoundingBoxSubsystem

    nativePtr

    A native pointer associated with this bounding box. The data pointed to by this pointer is implementation defined.

    Declaration
    public readonly IntPtr nativePtr { get; }
    Property Value
    Type Description
    IntPtr
    See Also
    XRBoundingBoxSubsystem

    pose

    The Pose, in session space, of the bounding box.

    Declaration
    public readonly Pose pose { get; }
    Property Value
    Type Description
    Pose
    See Also
    XRBoundingBoxSubsystem

    size

    The size (dimensions) of the bounding box in meters.

    Declaration
    public readonly Vector3 size { get; }
    Property Value
    Type Description
    Vector3
    See Also
    XRBoundingBoxSubsystem

    trackableId

    The TrackableId associated with this bounding box.

    Declaration
    public readonly TrackableId trackableId { get; }
    Property Value
    Type Description
    TrackableId
    See Also
    XRBoundingBoxSubsystem

    trackingState

    The TrackingState of the bounding box.

    Declaration
    public readonly TrackingState trackingState { get; }
    Property Value
    Type Description
    TrackingState
    See Also
    XRBoundingBoxSubsystem

    Methods

    Equals(object)

    Tests for equality.

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

    The object to compare against.

    Returns
    Type Description
    bool

    True if obj is of type XRBoundingBox and Equals(XRBoundingBox) also returns true; otherwise false.

    Overrides
    ValueType.Equals(object)
    See Also
    XRBoundingBoxSubsystem

    Equals(XRBoundingBox)

    Tests for equality.

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

    The other XRBoundingBox to compare against.

    Returns
    Type Description
    bool

    true if every field in other is equal to this XRBoundingBox, otherwise false.

    See Also
    XRBoundingBoxSubsystem

    GetHashCode()

    Generates a hash suitable for use with containers like HashSet and Dictionary.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code generated from this object's fields.

    Overrides
    ValueType.GetHashCode()
    See Also
    XRBoundingBoxSubsystem

    ToString()

    Generates a new string that describes the bounding box's properties, suitable for debugging purposes.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that describes the bounding box's properties.

    Overrides
    ValueType.ToString()
    See Also
    XRBoundingBoxSubsystem

    Operators

    operator ==(XRBoundingBox, XRBoundingBox)

    Tests for equality. Equivalent to Equals(XRBoundingBox).

    Declaration
    public static bool operator ==(XRBoundingBox lhs, XRBoundingBox rhs)
    Parameters
    Type Name Description
    XRBoundingBox lhs

    The left-hand side of the comparison.

    XRBoundingBox rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    true if lhs is equal to rhs. Otherwise, false.

    See Also
    XRBoundingBoxSubsystem

    operator !=(XRBoundingBox, XRBoundingBox)

    Tests for inequality. Same as !Equals(XRBoundingBox).

    Declaration
    public static bool operator !=(XRBoundingBox lhs, XRBoundingBox rhs)
    Parameters
    Type Name Description
    XRBoundingBox lhs

    The left-hand side of the comparison.

    XRBoundingBox rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    true if lhs is not equal to rhs, otherwise false.

    See Also
    XRBoundingBoxSubsystem

    Implements

    ITrackable
    IEquatable<T>

    See Also

    XRBoundingBoxSubsystem
    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)