C Specification
The application can chain an XrHandJointVelocitiesEXT structure to the
next pointer of XrHandJointLocationsEXT when calling
xrLocateHandJointsEXT to retrieve the hand joint velocities.
// Provided by XR_EXT_hand_tracking
typedef struct XrHandJointVelocitiesEXT {
    XrStructureType            type;
    void*                      next;
    uint32_t                   jointCount;
    XrHandJointVelocityEXT*    jointVelocities;
} XrHandJointVelocitiesEXT;Members
Description
The application must allocate the memory for the output array
jointVelocities that can contain at least jointCount of
XrHandJointVelocityEXT.
The application must input jointCount as described by the
XrHandJointSetEXT when creating the XrHandTrackerEXT.
Otherwise, the runtime must return XR_ERROR_VALIDATION_FAILURE.
The runtime must update the jointVelocities array in the order so
that the application can index elements using the corresponding hand joint
enum (e.g. XrHandJointEXT) as described by the XrHandJointSetEXT
when creating the XrHandTrackerEXT.
For example, when the XrHandTrackerEXT is created with
XR_HAND_JOINT_SET_DEFAULT_EXT, the application must set the
jointCount to XR_HAND_JOINT_COUNT_EXT, and the returned
jointVelocities array must be ordered to be indexed by enum
XrHandJointEXT enum.
If the returned XrHandJointLocationsEXT::isActive is false, it
indicates the hand tracker did not detect a hand input or the application
lost input focus.
In this case, the runtime must return all jointVelocities with
neither XR_SPACE_VELOCITY_LINEAR_VALID_BIT nor
XR_SPACE_VELOCITY_ANGULAR_VALID_BIT set.
If an XrHandJointVelocitiesEXT structure is chained to
XrHandJointLocationsEXT::next, the returned
XrHandJointLocationsEXT::isActive is true, and the velocity is
observed or can be calculated by the runtime, the runtime must fill in the
linear velocity of each hand joint within the reference frame of
XrHandJointsLocateInfoEXT::baseSpace and set the
XR_SPACE_VELOCITY_LINEAR_VALID_BIT.
Similarly, if an XrHandJointVelocitiesEXT structure is chained to
XrHandJointLocationsEXT::next, the returned
XrHandJointLocationsEXT::isActive is true, and the angular
velocity is observed or can be calculated by the runtime, the runtime
must fill in the angular velocity of each joint within the reference frame
of XrHandJointsLocateInfoEXT::baseSpace and set the
XR_SPACE_VELOCITY_ANGULAR_VALID_BIT.
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
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.