C Specification

The XrSpaceTriangleMeshMETA structure is defined as:

// Provided by XR_META_spatial_entity_mesh
typedef struct XrSpaceTriangleMeshMETA {
    XrStructureType    type;
    void*              next;
    uint32_t           vertexCapacityInput;
    uint32_t           vertexCountOutput;
    XrVector3f*        vertices;
    uint32_t           indexCapacityInput;
    uint32_t           indexCountOutput;
    uint32_t*          indices;
} XrSpaceTriangleMeshMETA;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • vertexCapacityInput is an input parameter for the application to specify the capacity of the vertices array, or 0 to indicate a request to retrieve the required capacity.

  • vertexCountOutput is an output parameter that will hold the number of vertices written in the output array, or the required capacity in the case that vertexCapacityInput is insufficient. The returned value must be equal to or larger than 3.

  • vertices is a pointer to an array of XrVector3f, but can be NULL if vertexCapacityInput is 0. The vertices are defined in the coordinate frame of XrSpace to which this struct is associated.

  • indexCapacityInput is an input parameter for the application to specify the capacity of the indices array, or 0 to indicate a request to retrieve the required capacity.

  • indexCountOutput is an output parameter that will hold the number of indices written in the output array, or the required capacity in the case that indexCapacityInput is insufficient. The returned value must be a multiple of 3.

  • indices is a pointer to an array of uint32_t, but can be NULL if indexCapacityInput is 0. Each element refers to a vertex in vertices.

  • See Buffer Size Parameters chapter for a detailed description of retrieving the required vertices and indices array sizes.

Description

The XrSpaceTriangleMeshMETA structure can be used by the application to perform the two calls required to obtain a triangle mesh associated to a specified spatial entity.

The output values written in the indices array represent indices of vertices: Three consecutive elements represent a triangle with a counter-clockwise winding order.

Valid Usage (Implicit)

See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024, The Khronos Group Inc.