WVR_CreateSpatialAnchorFromPersistenceName¶
-
WVR_EXPORT WVR_Result WVR_CreateSpatialAnchorFromPersistenceName(const WVR_SpatialAnchorFromPersistenceNameCreateInfo * createInfo, WVR_SpatialAnchor * anchor)
Function is used to create a spatial anchor from previous built persisted anchor.
Developers use this API to create a spatial anchor by unique persistedSpatialAnchorName of WVR_SpatialAnchorFromPersistenceNameCreateInfo and get an anchor handle. This spatial anchor which created from persisted anchor will be cleared once AP session closed. Each persistedSpatialAnchorName can only create one spatial anchor in an AP session otherwise it will get anchor duplicated error.
Note: Once the spatial anchor list has been changed, the corresponding event (WVR_EventType) will be fired. This API will cause WVR_EventType_SpatialAnchor_Changed event.
- Version
- API Level 14
- Parameters
createInfo
: creation information, refer to WVR_SpatialAnchorFromPersistenceNameCreateInfoanchor
: returned handle object that holds the spatial anchor is related to createInfo
- Return Value
WVR_Success
: Create a spatial anchor successfully.others
: WVR_Result mean failure.