C Specification

// Provided by XR_ANDROID_spatial_object_tracking
typedef struct XrSpatialCapabilityConfigurationObjectTrackingANDROID {
    XrStructureType                               type;
    const void*                                   next;
    XrSpatialCapabilityEXT                        capability;
    uint32_t                                      enabledComponentCount;
    const XrSpatialComponentTypeEXT*              enabledComponents;
    uint32_t                                      activeSemanticLabelCount;
    const XrSpatialObjectSemanticLabelANDROID*    activeSemanticLabels;
} XrSpatialCapabilityConfigurationObjectTrackingANDROID;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

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

  • capability is an XrSpatialCapabilityEXT and must be XR_SPATIAL_CAPABILITY_OBJECT_TRACKING_ANDROID.

  • enabledComponentCount is a uint32_t describing the count of elements in the enabledComponents array. It must be greater than 0.

  • enabledComponents is a pointer to an array of XrSpatialComponentTypeEXT.

  • activeSemanticLabelCount is a uint32_t describing the count of elements in the activeSemanticLabels array. It can be 0, which means all semantic labels are active, or it can be greater than 0, in which case the activeSemanticLabels array is used to determine which semantic labels are active.

  • activeSemanticLabels is a pointer to the array of XrSpatialObjectSemanticLabelANDROID indicating the active objects in tracking. It must be null if activeSemanticLabelCount is 0. And it must be non-null if activeSemanticLabelCount is greater than 0, which means that it is used to determine which semantic labels are active.

Description

Applications can enable the XR_SPATIAL_CAPABILITY_OBJECT_TRACKING_ANDROID spatial capability by adding a pointer to the XrSpatialCapabilityConfigurationObjectTrackingANDROID structure in XrSpatialContextCreateInfoEXT::capabilityConfigs.

The runtime must return XR_ERROR_VALIDATION_FAILURE if capability is not XR_SPATIAL_CAPABILITY_OBJECT_TRACKING_ANDROID.

Applications can specify the desired semantic labels in activeSemanticLabels which they are in favor to track. If there is no semantic labels specified in activeSemanticLabels and activeSemanticLabelCount is 0, all semantic labels are active to be tracked by default.

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