WVR_GetPersistedSpatialAnchorCount

WVR_EXPORT WVR_Result WVR_GetPersistedSpatialAnchorCount(WVR_PersistedSpatialAnchorCountGetInfo * getInfo)

Function is used to get the usage info of persisted anchors.

Developers use this API to get the usage info of persisted anchor. The amount of persisted anchors is limited for each AP. The AP will get error return value once allocated persisted anchors over maximumTrackingCount.

Version
API Level 14
Parameters
  • getInfo: count information of persisted anchors, refer to WVR_PersistedSpatialAnchorCountGetInfo
Return Value
  • WVR_Success: Get usage info of persisted anchors successfully.
  • others: WVR_Result mean failure.

How to use

Sample function:

#include <wvr/wvr_scene.h>
#include <wvr/wvr_anchor.h>

WVR_PersistedSpatialAnchorCountGetInfo getInfo = {};
if (WVR_GetPersistedSpatialAnchorCount(&getInfo) == WVR_Success) {
    // the getInfo is filled by runtime
    // getInfo.maximumTrackingCount means that the max number of persisted anchor supported by runtime
    // getInfo.currentTrackingCount means that the current usage number of persisted anchor
}