C Specification

The XrSpatialEntityComponentDataTriangleMeshBD structure is defined as:

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

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 the capacity of the vertices array, or 0 to indicate a request to retrieve the required capacity.

  • vertexCountOutput is the number of elements populated in the vertices array, or the required capacity in the case that vertexCapacityInput is insufficient.

  • vertices is an array of XrVector3f. It can be NULL if vertexCapacityInput is 0.

  • indexCapacityInput is the capacity of the indices array, or 0 to indicate a request to retrieve the required capacity.

  • indexCountOutput is the number of elements in the indices array, or the required capacity in the case that indexCapacityInput is insufficient.

  • indices is an array of indices. It can be NULL if indexCapacityInput is 0.

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

The XrSpatialEntityComponentDataTriangleMeshBD is an output struct for getting the triangle mesh component data from the snapshot. This corresponds to an XrSpatialEntityComponentTypeBD value of XR_SPATIAL_ENTITY_COMPONENT_TYPE_TRIANGLE_MESH_BD.

Description

The vertices array is a list of vertices described by the spatial entity’s coordinate space. The triangle vertices are in counter-clockwise order as viewed from the user perspective.

The indices array defines the topology of the triangle mesh. Each triplet of consecutive elements points to three vertices in the vertices array and thus form a triangle.

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-2025 The Khronos Group Inc.