Struct XrSpatialBounded2DDataEXT
The bounded 2D component. Provided by XR_EXT_spatial_entity.
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public readonly struct XrSpatialBounded2DDataEXT : IEquatable<XrSpatialBounded2DDataEXT>
Constructors
XrSpatialBounded2DDataEXT(XrPosef, XrExtent2Df)
Construct an instance.
Declaration
public XrSpatialBounded2DDataEXT(XrPosef center, XrExtent2Df extents)
Parameters
| Type | Name | Description |
|---|---|---|
| XrPosef | center | The center. |
| XrExtent2Df | extents | The extents. |
Properties
center
The geometric center of the bounded 2D component.
Declaration
public XrPosef center { get; }
Property Value
| Type | Description |
|---|---|
| XrPosef |
extents
The extents of the bounded 2D component along the x-axis (extents.width), and y-axis (extents.height), centered on center.
Declaration
public XrExtent2Df extents { get; }
Property Value
| Type | Description |
|---|---|
| XrExtent2Df |
Remarks
The extents refer to the entity’s size in the x-y plane of the plane’s coordinate system.
A plane with a position of {0, 0, 0}, rotation of {0, 0, 0, 1} (no rotation), and an extent of {1, 1}
refers to a 1 meter x 1 meter plane centered at {0, 0, 0} with its front face normal vector pointing
towards the +Z direction in the component’s space.
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 |
|
Overrides
Equals(XrSpatialBounded2DDataEXT)
Compares for equality.
Two instances are equal if their bits are exactly identical for the center and extents properties.
Declaration
public bool Equals(XrSpatialBounded2DDataEXT other)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialBounded2DDataEXT | other | The other instance. |
Returns
| Type | Description |
|---|---|
| bool |
|
GetHashCode()
Generates a unique hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code. |