C Specification

The XrBodyJointLocationsHTC structure is defined as:

// Provided by XR_HTC_body_tracking
typedef struct XrBodyJointLocationsHTC {
    XrStructureType             type;
    void*                       next;
    XrSpaceLocationFlags        combinedLocationFlags;
    XrBodyJointConfidenceHTC    confidenceLevel;
    uint32_t                    jointLocationCount;
    XrBodyJointLocationHTC*     jointLocations;
    uint32_t                    skeletonGenerationId;
} XrBodyJointLocationsHTC;

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.

  • combinedLocationFlags is a bitfield, with bit masks defined in XrSpaceLocationFlagBits, containing the bitwise OR of the location flags of all body joints.

  • confidenceLevel is an XrBodyJointConfidenceHTC value which indicates the confidence level for the returned body joint pose.

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

  • jointLocations is an application-allocated XrBodyJointLocationHTC array filled in by the runtime specifying the locations for individual body joints.

  • skeletonGenerationId is a unique identifier, representing the skeleton which is generated when the tracking auto-calibrates the user skeleton scale and proportions.

Description

The application must set jointLocationCount as appropriate for the chosen XrBodyJointSetHTC value when creating the XrBodyTrackerHTC. If jointLocationCount does not match the value associated with the supplied XrBodyJointSetHTC value, the runtime must return XR_ERROR_VALIDATION_FAILURE from xrLocateBodyJointsHTC.

An application must allocate the output jointLocations array with a minimum capacity of jointLocationCount of XrBodyJointLocationHTC elements. If the application supplies a NULL value for jointLocations, the runtime must return XR_ERROR_VALIDATION_FAILURE.

The runtime must update the jointLocations array elements indexed using the corresponding body joint enumeration (e.g. XrBodyJointHTC for the joint set XR_BODY_JOINT_SET_FULL_HTC) as described by XrBodyJointSetHTC when creating the XrBodyTrackerHTC. For example, when the XrBodyTrackerHTC is created with XR_BODY_JOINT_SET_FULL_HTC, the runtime must fill the jointLocations array with body joint data indexed by the XrBodyJointHTC enumeration.

If the runtime returns combinedLocationFlags with XR_SPACE_LOCATION_POSITION_VALID_BIT and XR_SPACE_LOCATION_ORIENTATION_VALID_BIT set, it indicates that the body tracker detects the joint space locations. If the runtime returns combinedLocationFlags with neither XR_SPACE_LOCATION_POSITION_VALID_BIT nor XR_SPACE_LOCATION_ORIENTATION_VALID_BIT set, it indicates that the body tracker did not detect the joint space locations.

The purpose of the skeleton is to provide data about the body size. The calculation of the body size may be updated during a session. Each time the calculation of the size is changed, XrBodyJointLocationsHTC::skeletonGenerationId is changed to indicate that a new skeleton may be retrieved. xrGetBodySkeletonHTC can be called with the specified skeletonGenerationId to get the corresponding skeleton.

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.