C Specification

The XrWorldMeshBlockML structure is defined as:

// Provided by XR_ML_world_mesh_detection
typedef struct XrWorldMeshBlockML {
    XrStructureType               type;
    void*                         next;
    XrUuidEXT                     uuid;
    XrWorldMeshBlockResultML      blockResult;
    XrWorldMeshDetectorLodML      lod;
    XrWorldMeshDetectorFlagsML    flags;
    uint32_t                      indexCount;
    uint16_t*                     indexBuffer;
    uint32_t                      vertexCount;
    XrVector3f*                   vertexBuffer;
    uint32_t                      normalCount;
    XrVector3f*                   normalBuffer;
    uint32_t                      confidenceCount;
    float*                        confidenceBuffer;
} XrWorldMeshBlockML;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain.

  • uuid is the XrUuidEXT of the mesh block

  • blockResult is the XrWorldMeshBlockResultML of the mesh block.

  • lod is the XrWorldMeshDetectorLodML used to generated this mesh block.

  • flags are the detector flags defined by XrWorldMeshDetectorFlagBitsML.

  • indexCount is the number of indices in the indexBuffer.

  • indexBuffer is the index buffer of type uint16_t. In the indexBuffer each value is the index of a vertex in the vertexBuffer. Three indices define one triangle. For example, the first triangle will have the vertices: vertexBuffer[index[0]], vertexBuffer[index[1]], vertexBuffer[index[2]]. Index order is defined by the XR_WORLD_MESH_DETECTOR_INDEX_ORDER_CW_BIT_ML flag.

  • vertexCount is the number of vertices in the vertexBuffer.

  • vertexBuffer is the vertex buffer of type XrVector3f. Vertex data will be provided in the XrWorldMeshStateRequestInfoML::baseSpace at time XrWorldMeshBlockStateML::lastUpdateTime.

  • normalCount is the number of normals in the normalBuffer.

  • normalBuffer is the normal buffer of type XrVector3f.

  • confidenceCount is the number of confidence values in the confidenceBuffer.

  • confidenceBuffer is the confidence buffer of type float with range 0.0 - 1.0.

Description

normalCount must be equal to vertexCount if XR_WORLD_MESH_DETECTOR_COMPUTE_NORMALS_BIT_ML was specified during XrWorldMeshDetectorML creation, otherwise 0.

confidenceCount must be equal to vertexCount if XR_WORLD_MESH_DETECTOR_COMPUTE_CONFIDENCE_BIT_ML was specified during XrWorldMeshDetectorML creation, otherwise 0.

Valid Usage (Implicit)
  • The XR_ML_world_mesh_detection extension must be enabled prior to using XrWorldMeshBlockML

  • type must be XR_TYPE_WORLD_MESH_BLOCK_ML

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • blockResult must be a valid XrWorldMeshBlockResultML value

  • lod must be a valid XrWorldMeshDetectorLodML value

  • flags must be a valid combination of XrWorldMeshDetectorFlagBitsML values

  • flags must not be 0

  • indexBuffer must be a pointer to an array of indexCount uint16_t values

  • vertexBuffer must be a pointer to an array of vertexCount XrVector3f structures

  • normalBuffer must be a pointer to an array of normalCount XrVector3f structures

  • confidenceBuffer must be a pointer to an array of confidenceCount float values

  • The indexCount parameter must be greater than 0

  • The vertexCount parameter must be greater than 0

  • The normalCount parameter must be greater than 0

  • The confidenceCount parameter must be greater than 0

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.