Class FBSpatialEntityStorage
This extension enables spatial entities to be stored and persisted across sessions. If the SPACE_COMPONENT_TYPE_STORABLE_FB component has been enabled on the spatial entity, application developers may save, load, and erase persisted XrSpace entities.
In order to enable the functionality of this extension, you must pass the name of the extension into CreateInstance via the XrInstanceCreateInfo::enabledExtensionNames parameter as indicated in the extension section.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intXrSpacePersistenceModeFB - Persistence modestatic final intXrSpacePersistenceModeFB - Persistence modestatic final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrEraseSpaceFB(XrSession session, long info, long requestId) Unsafe version of:EraseSpaceFBstatic intnxrSaveSpaceFB(XrSession session, long info, long requestId) Unsafe version of:SaveSpaceFBstatic intxrEraseSpaceFB(XrSession session, XrSpaceEraseInfoFB info, LongBuffer requestId) Erases a spatial entity from persistent storage.static intxrSaveSpaceFB(XrSession session, XrSpaceSaveInfoFB info, LongBuffer requestId) Saves a spatial entity to persistent storage.
-
Field Details
-
XR_FB_spatial_entity_storage_SPEC_VERSION
public static final int XR_FB_spatial_entity_storage_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_FB_SPATIAL_ENTITY_STORAGE_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_SPACE_SAVE_INFO_FB
public static final int XR_TYPE_SPACE_SAVE_INFO_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SPACE_ERASE_INFO_FB
public static final int XR_TYPE_SPACE_ERASE_INFO_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_EVENT_DATA_SPACE_SAVE_COMPLETE_FB
public static final int XR_TYPE_EVENT_DATA_SPACE_SAVE_COMPLETE_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_EVENT_DATA_SPACE_ERASE_COMPLETE_FB
public static final int XR_TYPE_EVENT_DATA_SPACE_ERASE_COMPLETE_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_SPACE_PERSISTENCE_MODE_INVALID_FB
public static final int XR_SPACE_PERSISTENCE_MODE_INVALID_FBXrSpacePersistenceModeFB - Persistence modeDescription
The
XrSpacePersistenceModeFBenumeration specifies the persistence mode for the save operation.Enumerant Descriptions
SPACE_PERSISTENCE_MODE_INVALID_FB— Invalid storage persistenceSPACE_PERSISTENCE_MODE_INDEFINITE_FB— StoreXrSpaceindefinitely, or until erased
See Also
- See Also:
-
XR_SPACE_PERSISTENCE_MODE_INDEFINITE_FB
public static final int XR_SPACE_PERSISTENCE_MODE_INDEFINITE_FBXrSpacePersistenceModeFB - Persistence modeDescription
The
XrSpacePersistenceModeFBenumeration specifies the persistence mode for the save operation.Enumerant Descriptions
SPACE_PERSISTENCE_MODE_INVALID_FB— Invalid storage persistenceSPACE_PERSISTENCE_MODE_INDEFINITE_FB— StoreXrSpaceindefinitely, or until erased
See Also
- See Also:
-
-
Method Details
-
nxrSaveSpaceFB
Unsafe version of:SaveSpaceFB -
xrSaveSpaceFB
Saves a spatial entity to persistent storage.C Specification
The
SaveSpaceFBfunction is defined as:XrResult xrSaveSpaceFB( XrSession session, const XrSpaceSaveInfoFB* info, XrAsyncRequestIdFB* requestId);Description
The
SaveSpaceFBfunction persists the spatial entity at the specified location with the specified mode. The runtime must returnERROR_VALIDATION_FAILUREifXrSpaceSaveInfoFB::spaceisNULL_HANDLEor otherwise invalid. The runtime must returnERROR_VALIDATION_FAILUREifXrSpaceSaveInfoFB::locationorXrSpaceSaveInfoFB::persistenceModeis invalid. This operation is asynchronous and the runtime must post anXrEventDataSpaceSaveCompleteFBevent when the operation completes successfully or encounters an error. If this function returns a failure code, no event is posted.Valid Usage (Implicit)
- The
XR_FB_spatial_entity_storageextension must be enabled prior to callingSaveSpaceFB sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrSpaceSaveInfoFBstructurerequestIdmust be a pointer to anXrAsyncRequestIdFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSession.info- contains the parameters for the save operation.requestId- an output parameter, and the variable it points to will be populated with the ID of this asynchronous request.
- The
-
nxrEraseSpaceFB
Unsafe version of:EraseSpaceFB -
xrEraseSpaceFB
Erases a spatial entity from persistent storage.C Specification
The
EraseSpaceFBfunction is defined as:XrResult xrEraseSpaceFB( XrSession session, const XrSpaceEraseInfoFB* info, XrAsyncRequestIdFB* requestId);Description
The
EraseSpaceFBfunction erases a spatial entity from storage at the specified location. TheXrSpaceremains valid in the current session until the application destroys it or the session ends. The runtime must returnERROR_VALIDATION_FAILUREifXrSpaceEraseInfoFB::spaceisNULL_HANDLEor otherwise invalid. The runtime must returnERROR_VALIDATION_FAILUREifXrSpaceEraseInfoFB::locationis invalid. This operation is asynchronous and the runtime must post anXrEventDataSpaceEraseCompleteFBevent when the operation completes successfully or encounters an error. If this function returns a failure code, no event is posted.Valid Usage (Implicit)
- The
XR_FB_spatial_entity_storageextension must be enabled prior to callingEraseSpaceFB sessionmust be a validXrSessionhandleinfomust be a pointer to a validXrSpaceEraseInfoFBstructurerequestIdmust be a pointer to anXrAsyncRequestIdFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSession.info- contains the parameters for the erase operation.requestId- an output parameter, and the variable it points to will be populated with the ID of this asynchronous request.
- The
-