C Specification

The xrCreateSpatialEntityAnchorBD function is defined as:

// Provided by XR_BD_spatial_sensing
XrResult xrCreateSpatialEntityAnchorBD(
    XrSenseDataProviderBD                       provider,
    const XrSpatialEntityAnchorCreateInfoBD*    createInfo,
    XrAnchorBD*                                 anchor);

Parameters

Parameter Descriptions

Description

Some spatial entities may have frequently changing poses, requiring real-time acquisition of their poses. The application can create the XrAnchorBD handle bound to the spatial entity through xrCreateSpatialEntityAnchorBD, and then create the XrSpace from it using xrCreateAnchorSpaceBD, so that the application can obtain its latest pose in real time through xrLocateSpace or xrLocateSpaces.

This function is not supported for all types of sense data providers. Whether this is supported in a type of sense data provider will be explained in the extension that defines the specific type of sense data provider. Otherwise, the runtime must return XR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_ENTITY_BD.

This handle and associated handles continue to be valid and usable even if the XrSenseDataSnapshotBD used at its creation has since been destroyed.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_SPATIAL_SENSING_SERVICE_UNAVAILABLE_BD

  • XR_ERROR_FEATURE_UNSUPPORTED

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.