C Specification

XrBodyJointLocationsFB structure returns the state of the body joint locations.

// Provided by XR_FB_body_tracking
typedef struct XrBodyJointLocationsFB {
    XrStructureType           type;
    void*                     next;
    XrBool32                  isActive;
    float                     confidence;
    uint32_t                  jointCount;
    XrBodyJointLocationFB*    jointLocations;
    uint32_t                  skeletonChangedCount;
    XrTime                    time;
} XrBodyJointLocationsFB;

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 body tracker is actively tracking.

  • confidence is a float between 0 and 1 which represents the confidence for the returned body pose. A value of 0 means there is no confidence in the pose returned, and a value of 1 means maximum confidence in the returned body pose.

  • jointCount is a uint32_t describing the count of elements in jointLocations array.

  • jointLocations is an application-allocated array of XrBodyJointLocationFB that will be filled with joint locations.

  • skeletonChangedCount is an output uint32_t incremental counter indicating that the skeleton scale proportions have changed. xrGetBodySkeletonFB can be called when this counter increases to get the latest body proportions/scale.

  • time is an XrTime time at which the returned joints are tracked. Equals the time at which the joints were requested if the interpolation at the time was successful.

Description

The runtime must return XR_ERROR_VALIDATION_FAILURE if jointCount does not equal to the number of joints defined by the XrBodyJointSetFB used to create the XrBodyTrackerFB.

The runtime must return jointLocations representing the range of human body motion, without any obstructions. Input systems that either obstruct the movement of the user’s body (for example, a held controller preventing the user from making a fist) or input systems that have only limited ability to track finger positions must use the information available to them to emulate an unobstructed range of motion.

The runtime must update the jointLocations array ordered so that it is indexed using the corresponding body joint enum (e.g. XrBodyJointFB) as described by XrBodyJointSetFB when creating the XrBodyTrackerFB. For example, when the XrBodyTrackerFB is created with XR_BODY_JOINT_SET_DEFAULT_FB, the application must set the jointCount to XR_BODY_JOINT_COUNT_FB, and the runtime must fill the jointLocations array ordered so that it is indexed by the XrBodyJointFB enum.

If the returned isActive is true, the runtime must return all joint locations with both XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_SPACE_LOCATION_ORIENTATION_VALID_BIT set. However, in this case, some joint space locations may be untracked (i.e. XR_SPACE_LOCATION_POSITION_TRACKED_BIT or XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT is unset).

If the returned isActive is false, it indicates that the body tracker did not detect the body input, the application lost input focus, or the consent for body tracking was denied by the user. In this case, the runtime must return all jointLocations with neither XR_SPACE_LOCATION_POSITION_VALID_BIT nor XR_SPACE_LOCATION_ORIENTATION_VALID_BIT set.

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.