C Specification
The xrCreateSpatialAnchorMSFT function is defined as:
// Provided by XR_MSFT_spatial_anchor
XrResult xrCreateSpatialAnchorMSFT(
XrSession session,
const XrSpatialAnchorCreateInfoMSFT* createInfo,
XrSpatialAnchorMSFT* anchor);
Parameters
Description
Creates an XrSpatialAnchorMSFT handle representing a spatial anchor
that will track a fixed location in the physical world over time.
That real-world location is specified by the position and orientation of the
specified XrSpatialAnchorCreateInfoMSFT::pose
within
XrSpatialAnchorCreateInfoMSFT::space
at
XrSpatialAnchorCreateInfoMSFT::time
.
The runtime must avoid long blocking operations such as networking or disk operations for xrCreateSpatialAnchorMSFT function. The application may safely use this function in UI thread. Though, the created anchor handle may not be ready immediately for certain operations yet. For example, the corresponding anchor space may not return valid location, or its location may not be successfully saved in anchor store.
If XrSpatialAnchorCreateInfoMSFT::space
cannot be located
relative to the environment at the moment of the call to
xrCreateSpatialAnchorMSFT, the runtime must return
XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT
.
After the anchor is created, the runtime should then adjust its position
and orientation over time relative to other spaces so as to maintain maximum
alignment to its original real-world location, even if that changes the
anchor’s relationship to the original
XrSpatialAnchorCreateInfoMSFT::space
used to initialize it.
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-2024, The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.