C Specification
The xrCreateAnchorSpaceBD function is defined as:
// Provided by XR_BD_spatial_sensing
XrResult xrCreateAnchorSpaceBD(
    XrSession                                   session,
    const XrAnchorSpaceCreateInfoBD*            createInfo,
    XrSpace*                                    space);Parameters
Description
The application can create an XrSpace for an anchor using
xrCreateAnchorSpaceBD.
Using this handle, the application can use calls like xrLocateSpace
and xrLocateSpaces to locate the anchor in a given base space at a
given time.
The createInfo parameter contains the XrAnchorBD as well as a
pose offset to apply.
Multiple XrSpace handles for a given XrAnchorBD may exist simultaneously, up to some limit imposed by the runtime. The XrSpace handle must be eventually freed via the xrDestroySpace function or by destroying the parent XrSession handle.
As the parent of all XrSpace handles, including those created with this function, is an XrSession handle, an anchor space may outlive the XrAnchorBD handle used to create it. Additionally, the ability to locate anchor spaces depends on spatial sensing being active. A valid XrSpace handle created for an XrAnchorBD must be unlocatable unless the associated XrSenseDataProviderBD has been started without since being stopped.
Such an unlocatable anchor space behaves the same as an unlocatable action space as discussed in https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#spaces-action-spaces-lifetime.
Note that destroying the XrAnchorBD used in creating an anchor space does not itself make the anchor space unlocatable; it only prevents creation of additional anchor spaces from that anchor. This mirrors the behavior of action spaces and destruction of their corresponding pose actions.
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
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.