C Specification

A XrHandMeshMSFT structure contains data and buffers to receive updates of hand mesh tracking data from xrUpdateHandMeshMSFT function.

// Provided by XR_MSFT_hand_tracking_mesh
typedef struct XrHandMeshMSFT {
    XrStructureType               type;
    void*                         next;
    XrBool32                      isActive;
    XrBool32                      indexBufferChanged;
    XrBool32                      vertexBufferChanged;
    XrHandMeshIndexBufferMSFT     indexBuffer;
    XrHandMeshVertexBufferMSFT    vertexBuffer;
} XrHandMeshMSFT;

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.

  • isActive is an XrBool32 indicating if the current hand tracker is active.

  • indexBufferChanged is an XrBool32 indicating if the indexBuffer content was changed during the update.

  • vertexBufferChanged is an XrBool32 indicating if the vertexBuffer content was changed during the update.

  • indexBuffer is an XrHandMeshIndexBufferMSFT returns the index buffer of the tracked hand mesh.

  • vertexBuffer is an XrHandMeshVertexBufferMSFT returns the vertex buffer of the tracked hand mesh.

Description

When the returned isActive value is XR_FALSE, the runtime indicates the hand is not actively tracked, for example, the hand is outside of sensor’s range, or the input focus is taken away from the application. When the runtime returns XR_FALSE to isActive, it must set indexBufferChanged and vertexBufferChanged to XR_FALSE, and must not change the content in indexBuffer or vertexBuffer,

When the returned isActive value is XR_TRUE, the hand tracking mesh represented in indexBuffer and vertexBuffer are updated to the latest data of the time given to the xrUpdateHandMeshMSFT function. The runtime must set indexBufferChanged and vertexBufferChanged to reflect whether the index or vertex buffer’s content are changed during the update. In this way, the application can easily avoid unnecessary processing of buffers when there’s no new data.

The hand mesh is represented in triangle lists and each triangle’s vertices are in clockwise order when looking from outside of the hand. When hand tracking is active, i.e. when isActive is returned as XR_TRUE, the returned indexBuffer.indexCountOutput value must be positive and multiple of 3, and vertexBuffer.vertexCountOutput value must be equal to or larger than 3.

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