Struct XrSpatialPolygon2DDataEXT
Polygon 2D component. Provided by XR_EXT_spatial_plane_tracking.
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public readonly struct XrSpatialPolygon2DDataEXT : IEquatable<XrSpatialPolygon2DDataEXT>
Constructors
XrSpatialPolygon2DDataEXT(XrPosef, XrSpatialBufferEXT)
Construct an instance.
Declaration
public XrSpatialPolygon2DDataEXT(XrPosef origin, XrSpatialBufferEXT vertexBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| XrPosef | origin | The origin. |
| XrSpatialBufferEXT | vertexBuffer | The vertex buffer. |
Properties
origin
The pose defining the origin of the polygon. All vertices of the polygon are relative to this origin in the X-Y plane.
Declaration
public XrPosef origin { get; }
Property Value
| Type | Description |
|---|---|
| XrPosef |
vertexBuffer
Vertex buffer of the entity that contains this component. Vertices must be in counter-clockwise order. The polygon represented by these vertices must not be self-intersecting, and may be concave.
Declaration
public XrSpatialBufferEXT vertexBuffer { get; }
Property Value
| Type | Description |
|---|---|
| XrSpatialBufferEXT |
Methods
Equals(object)
Compares for equality.
Two instances are equal if their origin and vertexBuffer properties are exactly equal.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The other object. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
Equals(XrSpatialPolygon2DDataEXT)
Compares for equality.
Two instances are equal if their origin and vertexBuffer properties are exactly equal.
Declaration
public bool Equals(XrSpatialPolygon2DDataEXT other)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialPolygon2DDataEXT | 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. |