docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct BoundedPlane

    The session-relative data associated with a plane.

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

    Constructors

    BoundedPlane(TrackableId, TrackableId, Pose, Vector2, Vector2, PlaneAlignment, TrackingState, IntPtr, PlaneClassification)

    Constructs a new instance. Bounded Plane objects are typically created by XRPlaneSubsystem.GetChanges.

    Declaration
    [Obsolete("BoundedPlane(TrackableId, TrackableId, Pose, Vector2, Vector2, PlaneAlignment, TrackingState, IntPtr, PlaneClassification) has been deprecated in AR Foundation version 6.0. Use BoundedPlane(TrackableId, TrackableId, Pose, Vector2, Vector2, PlaneAlignment, TrackingState, IntPtr, PlaneClassifications) instead.")]
    public BoundedPlane(TrackableId trackableId, TrackableId subsumedBy, Pose pose, Vector2 center, Vector2 size, PlaneAlignment alignment, TrackingState trackingState, IntPtr nativePtr, PlaneClassification classification)
    Parameters
    Type Name Description
    TrackableId trackableId

    The TrackableId associated with the plane.

    TrackableId subsumedBy

    The plane which subsumed this one. Use invalidId if it has not been subsumed.

    Pose pose

    The Pose associated with the plane.

    Vector2 center

    The center of the plane, in plane space (relative to pose).

    Vector2 size

    The dimensions associated with the plane.

    PlaneAlignment alignment

    The PlaneAlignment associated with the plane.

    TrackingState trackingState

    The TrackingState associated with the plane.

    IntPtr nativePtr

    The native pointer associated with the plane.

    PlaneClassification classification

    The PlaneClassification associated with the plane.

    See Also
    XRPlaneSubsystem

    BoundedPlane(TrackableId, TrackableId, Pose, Vector2, Vector2, PlaneAlignment, TrackingState, IntPtr, PlaneClassifications)

    Constructs a new instance. BoundedPlane objects are typically created by XRPlaneSubsystem.GetChanges.

    Declaration
    public BoundedPlane(TrackableId trackableId, TrackableId subsumedBy, Pose pose, Vector2 center, Vector2 size, PlaneAlignment alignment, TrackingState trackingState, IntPtr nativePtr, PlaneClassifications classifications)
    Parameters
    Type Name Description
    TrackableId trackableId

    The TrackableId associated with the plane.

    TrackableId subsumedBy

    The plane which subsumed this one. Use invalidId if it has not been subsumed.

    Pose pose

    The Pose describing the position and orientation of the plane.

    Vector2 center

    The center of the plane, in plane space (relative to pose).

    Vector2 size

    The dimensions of the plane.

    PlaneAlignment alignment

    The PlaneAlignment describing the alignment between the plane and the session space axes.

    TrackingState trackingState

    The TrackingState describing how well the XR device is tracking the plane.

    IntPtr nativePtr

    The native pointer associated with the plane.

    PlaneClassifications classifications

    The PlaneClassifications assigned to the plane by the XR device.

    See Also
    XRPlaneSubsystem

    Properties

    alignment

    The PlaneAlignment of the plane.

    Declaration
    public PlaneAlignment alignment { get; }
    Property Value
    Type Description
    PlaneAlignment
    See Also
    XRPlaneSubsystem

    center

    The center of the plane in plane space (relative to its pose).

    Declaration
    public Vector2 center { get; }
    Property Value
    Type Description
    Vector2
    See Also
    XRPlaneSubsystem

    classification

    The classification of this plane.

    Declaration
    [Obsolete("classification has been deprecated in AR Foundation version 6.0. Use classifications instead.")]
    public PlaneClassification classification { get; }
    Property Value
    Type Description
    PlaneClassification
    See Also
    XRPlaneSubsystem

    classifications

    The classifications of this plane.

    Declaration
    public PlaneClassifications classifications { get; }
    Property Value
    Type Description
    PlaneClassifications
    See Also
    XRPlaneSubsystem

    defaultValue

    Gets a default-initialized instance. This can be different from the zero-initialized version, e.g., the pose is Pose.identity instead of zero-initialized.

    Declaration
    public static BoundedPlane defaultValue { get; }
    Property Value
    Type Description
    BoundedPlane
    See Also
    XRPlaneSubsystem

    extents

    The extents of the plane (half dimensions) in meters.

    Declaration
    public Vector2 extents { get; }
    Property Value
    Type Description
    Vector2
    See Also
    XRPlaneSubsystem

    height

    The height (or depth) of the plane in meters.

    Declaration
    public float height { get; }
    Property Value
    Type Description
    float
    See Also
    XRPlaneSubsystem

    nativePtr

    A native pointer associated with this plane. The data pointer to by this pointer is implementation defined.

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

    normal

    The normal of the plane in session space.

    Declaration
    public Vector3 normal { get; }
    Property Value
    Type Description
    Vector3
    See Also
    XRPlaneSubsystem

    plane

    Gets an infinite plane in session space.

    Declaration
    public Plane plane { get; }
    Property Value
    Type Description
    Plane
    See Also
    XRPlaneSubsystem

    pose

    The Pose, in session space, of the plane.

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

    size

    The size (dimensions) of the plane in meters.

    Declaration
    public Vector2 size { get; }
    Property Value
    Type Description
    Vector2
    See Also
    XRPlaneSubsystem

    subsumedById

    The TrackableId associated with the plane which subsumed this one. Will be invalidId if this plane has not been subsumed.

    Declaration
    public TrackableId subsumedById { get; }
    Property Value
    Type Description
    TrackableId
    See Also
    XRPlaneSubsystem

    trackableId

    The TrackableId associated with this plane.

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

    trackingState

    The TrackingState of the plane.

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

    width

    The width of the plane in meters.

    Declaration
    public float width { get; }
    Property Value
    Type Description
    float
    See Also
    XRPlaneSubsystem

    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 BoundedPlane and Equals(BoundedPlane) also returns true; otherwise false.

    Overrides
    ValueType.Equals(object)
    See Also
    XRPlaneSubsystem

    Equals(BoundedPlane)

    Tests for equality.

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

    The other BoundedPlane to compare against.

    Returns
    Type Description
    bool

    True if every field in other is equal to this BoundedPlane, otherwise false.

    See Also
    XRPlaneSubsystem

    GetCorners(out Vector3, out Vector3, out Vector3, out Vector3)

    Get the four corners of the plane in session space, in clockwise order.

    Declaration
    public void GetCorners(out Vector3 p0, out Vector3 p1, out Vector3 p2, out Vector3 p3)
    Parameters
    Type Name Description
    Vector3 p0

    The first vertex.

    Vector3 p1

    The second vertex.

    Vector3 p2

    The third vertex.

    Vector3 p3

    The fourth vertex.

    See Also
    XRPlaneSubsystem

    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
    XRPlaneSubsystem

    ToString()

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

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that describes the plane's properties.

    Overrides
    ValueType.ToString()
    See Also
    XRPlaneSubsystem

    Operators

    operator ==(BoundedPlane, BoundedPlane)

    Tests for equality. Same as Equals(BoundedPlane).

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

    The left-hand side of the comparison.

    BoundedPlane rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

    True if lhs is equal to rhs, otherwise false.

    See Also
    XRPlaneSubsystem

    operator !=(BoundedPlane, BoundedPlane)

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

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

    The left-hand side of the comparison.

    BoundedPlane rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    bool

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

    See Also
    XRPlaneSubsystem

    Implements

    ITrackable
    IEquatable<T>

    See Also

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