Struct BoundedPlane
The session-relative data associated with a plane.
Inherited Members
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 BoundedPlane. This is just a data container for a plane's session relative data. These are typically created by GetChanges(Allocator).
Declaration
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  | 
| Vector2 | center | The center of the plane, in plane space (relative to  | 
| 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
Properties
alignment
The PlaneAlignment of the plane.
Declaration
public PlaneAlignment alignment { get; }Property Value
| Type | Description | 
|---|---|
| PlaneAlignment | 
See Also
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
classification
The PlaneClassification of the plane.
Declaration
public PlaneClassification classification { get; }Property Value
| Type | Description | 
|---|---|
| PlaneClassification | 
See Also
defaultValue
Gets a default-initialized BoundedPlane. 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
extents
The extents of the plane (half dimensions) in meters.
Declaration
public Vector2 extents { get; }Property Value
| Type | Description | 
|---|---|
| Vector2 | 
See Also
height
The height (or depth) of the plane in meters.
Declaration
public float height { get; }Property Value
| Type | Description | 
|---|---|
| float | 
See Also
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
normal
The normal of the plane in session space.
Declaration
public Vector3 normal { get; }Property Value
| Type | Description | 
|---|---|
| Vector3 | 
See Also
plane
Gets an infinite plane in session space.
Declaration
public Plane plane { get; }Property Value
| Type | Description | 
|---|---|
| Plane | 
See Also
pose
The Pose, in session space, of the plane.
Declaration
public Pose pose { get; }Property Value
| Type | Description | 
|---|---|
| Pose | 
See Also
size
The size (dimensions) of the plane in meters.
Declaration
public Vector2 size { get; }Property Value
| Type | Description | 
|---|---|
| Vector2 | 
See Also
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
trackableId
The TrackableId associated with this plane.
Declaration
public TrackableId trackableId { get; }Property Value
| Type | Description | 
|---|---|
| TrackableId | 
See Also
trackingState
The TrackingState of the plane.
Declaration
public TrackingState trackingState { get; }Property Value
| Type | Description | 
|---|---|
| TrackingState | 
See Also
width
The width of the plane in meters.
Declaration
public float width { get; }Property Value
| Type | Description | 
|---|---|
| float | 
See Also
Methods
Equals(object)
Tests for equality.
Declaration
public override bool Equals(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | The  | 
Returns
| Type | Description | 
|---|---|
| bool | 
 | 
Overrides
See Also
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 | 
 | 
See Also
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
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
See Also
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
See Also
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 | 
 | 
See Also
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 | 
 |