Struct BoundedPlane
The session relative data associated with a plane.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public struct BoundedPlane : ITrackable, IEquatable<BoundedPlane>
Constructors
BoundedPlane(TrackableId, TrackableId, Pose, Vector2, Vector2, PlaneAlignment, TrackingState, IntPtr)
Constructs a new BoundedPlane. This is just a data container
for a plane's session relative data. These are typically created by
Declaration
public BoundedPlane(TrackableId trackableId, TrackableId subsumedBy, Pose pose, Vector2 center, Vector2 size, PlaneAlignment alignment, TrackingState trackingState, IntPtr nativePtr)
Parameters
| Type | Name | Description | 
|---|---|---|
| TrackableId | trackableId | The TrackableId associated with the point cloud.  | 
| TrackableId | subsumedBy | The plane which subsumed this one. Use invalidId if it has not been subsumed.  | 
| Pose | pose | The   | 
| Vector2 | center | The center, in plane-space (relative to   | 
| Vector2 | size | The dimensions associated with the point cloud.  | 
| PlaneAlignment | alignment | The PlaneAlignment associated with the point cloud.  | 
| TrackingState | trackingState | The TrackingState associated with the point cloud.  | 
| IntPtr | nativePtr | The native pointer associated with the point cloud.  | 
Properties
alignment
The PlaneAlignment of the plane.
Declaration
public PlaneAlignment alignment { get; }
Property Value
| Type | Description | 
|---|---|
| PlaneAlignment | 
center
The center of the plane in plane space (relative to its pose).
Declaration
public Vector2 center { get; }
Property Value
| Type | Description | 
|---|---|
| Vector2 | 
extents
The extents of the plane (half dimensions) in meters.
Declaration
public Vector2 extents { get; }
Property Value
| Type | Description | 
|---|---|
| Vector2 | 
height
The height (or depth) of the plane in meters.
Declaration
public float height { get; }
Property Value
| Type | Description | 
|---|---|
| Single | 
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 | 
normal
The normal of the plane in session space.
Declaration
public Vector3 normal { get; }
Property Value
| Type | Description | 
|---|---|
| Vector3 | 
plane
Gets an infinite plane in session space.
Declaration
public Plane plane { get; }
Property Value
| Type | Description | 
|---|---|
| Plane | 
pose
The Pose, in session space, of the plane.
Declaration
public Pose pose { get; }
Property Value
| Type | Description | 
|---|---|
| Pose | 
Implements
size
The size (dimensions) of the plane in meters.
Declaration
public Vector2 size { get; }
Property Value
| Type | Description | 
|---|---|
| Vector2 | 
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 | 
trackableId
The TrackableId associated with this plane.
Declaration
public TrackableId trackableId { get; }
Property Value
| Type | Description | 
|---|---|
| TrackableId | 
Implements
trackingState
The TrackingState of the plane.
Declaration
public TrackingState trackingState { get; }
Property Value
| Type | Description | 
|---|---|
| TrackingState | 
Implements
width
The width of the plane in meters.
Declaration
public float width { get; }
Property Value
| Type | Description | 
|---|---|
| Single | 
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description | 
|---|---|---|
| Object | obj | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
Overrides
Equals(BoundedPlane)
Declaration
public bool Equals(BoundedPlane other)
Parameters
| Type | Name | Description | 
|---|---|---|
| BoundedPlane | other | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
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.  | 
GetDefault()
Gets a default-initialized BoundedPlane. This may be
different from the zero-initialized version, e.g., the pose
is Pose.identity instead of zero-initialized.
Declaration
public static BoundedPlane GetDefault()
Returns
| Type | Description | 
|---|---|
| BoundedPlane | A default BoundedPlane.  | 
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description | 
|---|---|
| Int32 | 
Overrides
ToString()
Generates a new string describing the plane's properties suitable for debugging purposes.
Declaration
public override string ToString()
Returns
| Type | Description | 
|---|---|
| String | A string describing the plane's properties.  | 
Overrides
Operators
Equality(BoundedPlane, BoundedPlane)
Declaration
public static bool operator ==(BoundedPlane lhs, BoundedPlane rhs)
Parameters
| Type | Name | Description | 
|---|---|---|
| BoundedPlane | lhs | |
| BoundedPlane | rhs | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
Inequality(BoundedPlane, BoundedPlane)
Declaration
public static bool operator !=(BoundedPlane lhs, BoundedPlane rhs)
Parameters
| Type | Name | Description | 
|---|---|---|
| BoundedPlane | lhs | |
| BoundedPlane | rhs | 
Returns
| Type | Description | 
|---|---|
| Boolean |