Class MSFTSpatialAnchorPersistence
- java.lang.Object
-
- org.lwjgl.openxr.MSFTSpatialAnchorPersistence
-
public class MSFTSpatialAnchorPersistence extends java.lang.ObjectThe MSFT_spatial_anchor_persistence extension.
-
-
Field Summary
Fields Modifier and Type Field Description static intXR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT
XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFTExtendsXrResult.static intXR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFTXR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFTstatic java.lang.StringXR_MSFT_SPATIAL_ANCHOR_PERSISTENCE_EXTENSION_NAMEThe extension name.static intXR_MSFT_spatial_anchor_persistence_SPEC_VERSIONThe extension specification version.static intXR_OBJECT_TYPE_SPATIAL_ANCHOR_STORE_CONNECTION_MSFTExtendsXrObjectType.static intXR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT
XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFTExtendsXrStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnxrCreateSpatialAnchorFromPersistedNameMSFT(XrSession session, long spatialAnchorCreateInfo, long spatialAnchor)Unsafe version of:CreateSpatialAnchorFromPersistedNameMSFTstatic intnxrCreateSpatialAnchorStoreConnectionMSFT(XrSession session, long spatialAnchorStore)Unsafe version of:CreateSpatialAnchorStoreConnectionMSFTstatic intnxrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, int spatialAnchorNamesCapacityInput, long spatialAnchorNamesCountOutput, long persistedAnchorNames)Unsafe version of:EnumeratePersistedSpatialAnchorNamesMSFTstatic intnxrPersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, long spatialAnchorPersistenceInfo)Unsafe version of:PersistSpatialAnchorMSFTstatic intnxrUnpersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, long spatialAnchorPersistenceName)Unsafe version of:UnpersistSpatialAnchorMSFTstatic intxrClearSpatialAnchorStoreMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore)Clear all spatial anchors from the spatial anchor store.static intxrCreateSpatialAnchorFromPersistedNameMSFT(XrSession session, XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT spatialAnchorCreateInfo, org.lwjgl.PointerBuffer spatialAnchor)Create a spatial anchor from the spatial anchor store by name.static intxrCreateSpatialAnchorStoreConnectionMSFT(XrSession session, org.lwjgl.PointerBuffer spatialAnchorStore)Create a handle to track a connection to the spatial anchor store.static intxrDestroySpatialAnchorStoreConnectionMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore)Destroys the anchor store handle.static intxrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, java.nio.IntBuffer spatialAnchorNamesCountOutput, XrSpatialAnchorPersistenceNameMSFT.Buffer persistedAnchorNames)Enumerate the names of currently persisted spatial anchors in the spatial anchor store.static intxrPersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, XrSpatialAnchorPersistenceInfoMSFT spatialAnchorPersistenceInfo)Persist the spatial anchor in the spatial anchor store.static intxrUnpersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName)Removes an anchor from the store.
-
-
-
Field Detail
-
XR_MSFT_spatial_anchor_persistence_SPEC_VERSION
The extension specification version.
-
XR_MSFT_SPATIAL_ANCHOR_PERSISTENCE_EXTENSION_NAME
The extension name.
-
XR_OBJECT_TYPE_SPATIAL_ANCHOR_STORE_CONNECTION_MSFT
ExtendsXrObjectType.
-
XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT, XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT
ExtendsXrStructureType.Enum values:
-
XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT, XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT
ExtendsXrResult.Enum values:
-
XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT
XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT
-
-
Method Detail
-
nxrCreateSpatialAnchorStoreConnectionMSFT
public static int nxrCreateSpatialAnchorStoreConnectionMSFT(XrSession session, long spatialAnchorStore)
Unsafe version of:CreateSpatialAnchorStoreConnectionMSFT
-
xrCreateSpatialAnchorStoreConnectionMSFT
public static int xrCreateSpatialAnchorStoreConnectionMSFT(XrSession session, org.lwjgl.PointerBuffer spatialAnchorStore)
Create a handle to track a connection to the spatial anchor store.C Specification
The application can use the
CreateSpatialAnchorStoreConnectionMSFTfunction to create an handle to the spatial anchor store. The application can use this handle to interact with the spatial anchor store in order to persist anchors across application sessions.The
CreateSpatialAnchorStoreConnectionMSFTfunction may be a slow operation and therefore should be invoked from a non-timing critical thread.XrResult xrCreateSpatialAnchorStoreConnectionMSFT( XrSession session, XrSpatialAnchorStoreConnectionMSFT* spatialAnchorStore);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingCreateSpatialAnchorStoreConnectionMSFT sessionmust be a validXrSessionhandlespatialAnchorStoremust be a pointer to anXrSpatialAnchorStoreConnectionMSFThandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- theXrSessionthe anchor was created with.spatialAnchorStore- a pointer to theXrSpatialAnchorStoreConnectionMSFThandle.
- The
-
xrDestroySpatialAnchorStoreConnectionMSFT
public static int xrDestroySpatialAnchorStoreConnectionMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore)
Destroys the anchor store handle.C Specification
The application can use the
DestroySpatialAnchorStoreConnectionMSFTfunction to destroy an anchor store connection.XrResult xrDestroySpatialAnchorStoreConnectionMSFT( XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingDestroySpatialAnchorStoreConnectionMSFT spatialAnchorStoremust be a validXrSpatialAnchorStoreConnectionMSFThandle
Thread Safety
- Access to
spatialAnchorStore, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
spatialAnchorStore- theXrSpatialAnchorStoreConnectionMSFTto be destroyed.
- The
-
nxrPersistSpatialAnchorMSFT
public static int nxrPersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, long spatialAnchorPersistenceInfo)
Unsafe version of:PersistSpatialAnchorMSFT
-
xrPersistSpatialAnchorMSFT
public static int xrPersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, XrSpatialAnchorPersistenceInfoMSFT spatialAnchorPersistenceInfo)
Persist the spatial anchor in the spatial anchor store.C Specification
The application can use the
PersistSpatialAnchorMSFTfunction to persist a spatial anchor in the spatial anchor store for this application. The givenspatialAnchorNamewill be the string to retrieve the spatial anchor from the Spatial Anchor store or subsequently remove the record of this spatial anchor from the store. This name will uniquely identify the spatial anchor for the current application. If there is already a spatial anchor of the same name persisted in the spatial anchor store, the existing spatial anchor will be replaced andPersistSpatialAnchorMSFTmust returnSUCCESS.XrResult xrPersistSpatialAnchorMSFT( XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, const XrSpatialAnchorPersistenceInfoMSFT* spatialAnchorPersistenceInfo);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingPersistSpatialAnchorMSFT spatialAnchorStoremust be a validXrSpatialAnchorStoreConnectionMSFThandlespatialAnchorPersistenceInfomust be a pointer to a validXrSpatialAnchorPersistenceInfoMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
spatialAnchorStore- theXrSpatialAnchorStoreConnectionMSFTwith which to persist thespatialAnchor.spatialAnchorPersistenceInfo- a pointer toXrSpatialAnchorPersistenceInfoMSFTstructure to specify the anchor and its name to persist.
- The
-
nxrEnumeratePersistedSpatialAnchorNamesMSFT
public static int nxrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, int spatialAnchorNamesCapacityInput, long spatialAnchorNamesCountOutput, long persistedAnchorNames)
Unsafe version of:EnumeratePersistedSpatialAnchorNamesMSFT- Parameters:
spatialAnchorNamesCapacityInput- the capacity of thespatialAnchorNamesarray, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumeratePersistedSpatialAnchorNamesMSFT
public static int xrEnumeratePersistedSpatialAnchorNamesMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, @Nullable java.nio.IntBuffer spatialAnchorNamesCountOutput, @Nullable XrSpatialAnchorPersistenceNameMSFT.Buffer persistedAnchorNames)
Enumerate the names of currently persisted spatial anchors in the spatial anchor store.C Specification
The application can use the
EnumeratePersistedSpatialAnchorNamesMSFTfunction to enumerate the names of all spatial anchors currently persisted in the spatial anchor store for this application. This function follows the two-call idiom for filling thespatialAnchorNames.XrResult xrEnumeratePersistedSpatialAnchorNamesMSFT( XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, uint32_t spatialAnchorNamesCapacityInput, uint32_t* spatialAnchorNamesCountOutput, XrSpatialAnchorPersistenceNameMSFT* persistedAnchorNames);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingEnumeratePersistedSpatialAnchorNamesMSFT spatialAnchorStoremust be a validXrSpatialAnchorStoreConnectionMSFThandle- If
spatialAnchorNamesCountOutputis notNULL,spatialAnchorNamesCountOutputmust be a pointer to auint32_tvalue - If
spatialAnchorNamesCapacityInputis not 0,persistedAnchorNamesmust be a pointer to an array ofspatialAnchorNamesCapacityInputXrSpatialAnchorPersistenceNameMSFTstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
spatialAnchorStore- theXrSpatialAnchorStoreConnectionMSFTanchor store to perform the enumeration operation on.spatialAnchorNamesCountOutput- filled in by the runtime with the count of anchor names written or the required capacity in the case thatspatialAnchorNamesCapacityInputis 0.persistedAnchorNames- a pointer to an array ofXrSpatialAnchorPersistenceNameMSFTstructures, but can beNULLif propertyCapacityInput is 0.
- The
-
nxrCreateSpatialAnchorFromPersistedNameMSFT
public static int nxrCreateSpatialAnchorFromPersistedNameMSFT(XrSession session, long spatialAnchorCreateInfo, long spatialAnchor)
Unsafe version of:CreateSpatialAnchorFromPersistedNameMSFT
-
xrCreateSpatialAnchorFromPersistedNameMSFT
public static int xrCreateSpatialAnchorFromPersistedNameMSFT(XrSession session, XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT spatialAnchorCreateInfo, org.lwjgl.PointerBuffer spatialAnchor)
Create a spatial anchor from the spatial anchor store by name.C Specification
The application can use the
CreateSpatialAnchorFromPersistedNameMSFTfunction to create aXrSpatialAnchorMSFTfrom the spatial anchor store. If thespatialAnchorNameprovided does not correspond to a currently stored anchor (i.e. the list of spatial anchor names returned fromEnumeratePersistedSpatialAnchorNamesMSFT), the function must returnERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT.XrResult xrCreateSpatialAnchorFromPersistedNameMSFT( XrSession session, const XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT* spatialAnchorCreateInfo, XrSpatialAnchorMSFT* spatialAnchor);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingCreateSpatialAnchorFromPersistedNameMSFT sessionmust be a validXrSessionhandlespatialAnchorCreateInfomust be a pointer to a validXrSpatialAnchorFromPersistedAnchorCreateInfoMSFTstructurespatialAnchormust be a pointer to anXrSpatialAnchorMSFThandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.spatialAnchorCreateInfo- a pointer to theXrSpatialAnchorFromPersistedAnchorCreateInfoMSFT.spatialAnchor- a pointer to anXrSpatialAnchorMSFThandle that will be set by the runtime on successful load.
- The
-
nxrUnpersistSpatialAnchorMSFT
public static int nxrUnpersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, long spatialAnchorPersistenceName)
Unsafe version of:UnpersistSpatialAnchorMSFT
-
xrUnpersistSpatialAnchorMSFT
public static int xrUnpersistSpatialAnchorMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, XrSpatialAnchorPersistenceNameMSFT spatialAnchorPersistenceName)
Removes an anchor from the store.C Specification
The application can use the
UnpersistSpatialAnchorMSFTfunction to remove the record of the anchor in the spatial anchor store. This operation will not affect anyXrSpatialAnchorMSFThandles previously created. If thespatialAnchorNameprovided does not correspond to a currently stored anchor, the function must returnERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT.XrResult xrUnpersistSpatialAnchorMSFT( XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore, const XrSpatialAnchorPersistenceNameMSFT* spatialAnchorPersistenceName);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingUnpersistSpatialAnchorMSFT spatialAnchorStoremust be a validXrSpatialAnchorStoreConnectionMSFThandlespatialAnchorPersistenceNamemust be a pointer to a validXrSpatialAnchorPersistenceNameMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
spatialAnchorStore- anXrSpatialAnchorStoreConnectionMSFTanchor store to perform the unpersist operation on.spatialAnchorPersistenceName- a pointer to theXrSpatialAnchorPersistenceNameMSFT.
- The
-
xrClearSpatialAnchorStoreMSFT
public static int xrClearSpatialAnchorStoreMSFT(XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore)
Clear all spatial anchors from the spatial anchor store.C Specification
The application can use the
ClearSpatialAnchorStoreMSFTfunction to remove all spatial anchors from the spatial anchor store for this application. The function only removes the record of the spatial anchors in the store but does not affect anyXrSpatialAnchorMSFThandles previously loaded in the current session.XrResult xrClearSpatialAnchorStoreMSFT( XrSpatialAnchorStoreConnectionMSFT spatialAnchorStore);Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchor_persistenceextension must be enabled prior to callingClearSpatialAnchorStoreMSFT spatialAnchorStoremust be a validXrSpatialAnchorStoreConnectionMSFThandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
spatialAnchorStore-XrSpatialAnchorStoreConnectionMSFTto perform the clear operation on.
- The
-
-