Struct XrSpatialMeshDataEXT
The mesh component. Provided by XR_EXT_spatial_entity
.
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public readonly struct XrSpatialMeshDataEXT : IEquatable<XrSpatialMeshDataEXT>
Constructors
XrSpatialMeshDataEXT(XrPosef, XrSpatialBufferEXT, XrSpatialBufferEXT)
Construct an instance.
Declaration
public XrSpatialMeshDataEXT(XrPosef origin, XrSpatialBufferEXT vertexBuffer, XrSpatialBufferEXT indexBuffer)
Parameters
Type | Name | Description |
---|---|---|
XrPosef | origin | The origin. |
XrSpatialBufferEXT | vertexBuffer | The vertex buffer. |
XrSpatialBufferEXT | indexBuffer | The index buffer. |
Properties
indexBuffer
Buffer that specifies the triangles of the mesh using the indices of vertexBuffer. The indices must be returned in counter-clockwise winding order with three indices per triangle.
Declaration
public XrSpatialBufferEXT indexBuffer { get; }
Property Value
Type | Description |
---|---|
XrSpatialBufferEXT |
origin
A pose defining the origin of the mesh. All vertices of the mesh must be relative to this origin.
Declaration
public XrPosef origin { get; }
Property Value
Type | Description |
---|---|
XrPosef |
vertexBuffer
Buffer that contains the vertices of the mesh.
Declaration
public XrSpatialBufferEXT vertexBuffer { get; }
Property Value
Type | Description |
---|---|
XrSpatialBufferEXT |
Methods
Equals(object)
Compares for equality. Two instances are equal if their bits are exactly
identical for the origin
, vertexBuffer
, and indexBuffer
properties.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The other object. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(XrSpatialMeshDataEXT)
Compares for equality. Two instances are equal if their bits are exactly
identical for the origin
, vertexBuffer
, and indexBuffer
properties.
Declaration
public bool Equals(XrSpatialMeshDataEXT other)
Parameters
Type | Name | Description |
---|---|---|
XrSpatialMeshDataEXT | 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. |