Class MSFTSceneUnderstandingSerialization
This extension extends the scene understanding extension and enables scenes to be serialized or deserialized. It enables computing a new scene into a serialized binary stream and it enables deserializing a binary stream into an XrSceneMSFT handle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrSceneComponentTypeMSFT.static final intExtendsXrSceneComputeFeatureMSFT.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, long deserializeInfo) Unsafe version of:DeserializeSceneMSFTstatic intnxrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, long getInfo, int countInput, long readOutput, long buffer) Unsafe version of:GetSerializedSceneFragmentDataMSFTstatic intxrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, XrSceneDeserializeInfoMSFT deserializeInfo) Deserialize scene.static intxrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, XrSerializedSceneFragmentDataGetInfoMSFT getInfo, IntBuffer readOutput, @Nullable ByteBuffer buffer) Get serialized scene fragment data.
-
Field Details
-
XR_MSFT_scene_understanding_serialization_SPEC_VERSION
public static final int XR_MSFT_scene_understanding_serialization_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_MSFT_SCENE_UNDERSTANDING_SERIALIZATION_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFT
public static final int XR_TYPE_SERIALIZED_SCENE_FRAGMENT_DATA_GET_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SCENE_DESERIALIZE_INFO_MSFT
public static final int XR_TYPE_SCENE_DESERIALIZE_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_SCENE_COMPUTE_FEATURE_SERIALIZE_SCENE_MSFT
public static final int XR_SCENE_COMPUTE_FEATURE_SERIALIZE_SCENE_MSFTExtendsXrSceneComputeFeatureMSFT.- See Also:
-
XR_SCENE_COMPONENT_TYPE_SERIALIZED_SCENE_FRAGMENT_MSFT
public static final int XR_SCENE_COMPONENT_TYPE_SERIALIZED_SCENE_FRAGMENT_MSFTExtendsXrSceneComponentTypeMSFT.- See Also:
-
-
Method Details
-
nxrDeserializeSceneMSFT
Unsafe version of:DeserializeSceneMSFT -
xrDeserializeSceneMSFT
public static int xrDeserializeSceneMSFT(XrSceneObserverMSFT sceneObserver, XrSceneDeserializeInfoMSFT deserializeInfo) Deserialize scene.C Specification
The
DeserializeSceneMSFTfunction is defined as:XrResult xrDeserializeSceneMSFT( XrSceneObserverMSFT sceneObserver, const XrSceneDeserializeInfoMSFT* deserializeInfo);Description
The
DeserializeSceneMSFTfunction begins deserializing a list of serialized scene fragments. The runtime must return quickly without waiting for the deserialization to complete. The application should useGetSceneComputeStateMSFTto inspect the completeness of the deserialization.The runtime must return
ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFTifDeserializeSceneMSFTis called while the scene computation is in progress.The
GetSceneComputeStateMSFTfunction must returnSCENE_COMPUTE_STATE_UPDATING_MSFTwhile the deserialization is in progress, andSCENE_COMPUTE_STATE_COMPLETED_MSFTwhen the deserialization has completed successfully. If the runtime fails to deserialize the binary stream,GetSceneComputeStateMSFTmust returnSCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFTto indicate that the deserialization has completed but an error occurred.When
GetSceneComputeStateMSFTreturnsSCENE_COMPUTE_STATE_COMPLETED_MSFT, the application may callCreateSceneMSFTto create theXrSceneMSFThandle. IfCreateSceneMSFTis called whileGetSceneComputeStateMSFTreturnsSCENE_COMPUTE_STATE_COMPLETED_WITH_ERROR_MSFT, a validXrSceneMSFThandle must be returned, but that handle must contain zero scene components.Valid Usage (Implicit)
- The
XR_MSFT_scene_understanding_serializationextension must be enabled prior to callingDeserializeSceneMSFT sceneObservermust be a validXrSceneObserverMSFThandledeserializeInfomust be a pointer to a validXrSceneDeserializeInfoMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
sceneObserver- a handle to anXrSceneObserverMSFTpreviously created withCreateSceneObserverMSFT.deserializeInfo- a pointer to anXrSceneDeserializeInfoMSFTstructure.
- The
-
nxrGetSerializedSceneFragmentDataMSFT
public static int nxrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, long getInfo, int countInput, long readOutput, long buffer) Unsafe version of:GetSerializedSceneFragmentDataMSFT- Parameters:
countInput- the number of bytes that should be read.
-
xrGetSerializedSceneFragmentDataMSFT
public static int xrGetSerializedSceneFragmentDataMSFT(XrSceneMSFT scene, XrSerializedSceneFragmentDataGetInfoMSFT getInfo, IntBuffer readOutput, @Nullable ByteBuffer buffer) Get serialized scene fragment data.C Specification
The application can call the
GetSerializedSceneFragmentDataMSFTfunction to read the binary data of a serialized scene fragment from theXrSceneMSFThandle. This function follows the two-call idiom for filling the buffer.The
GetSerializedSceneFragmentDataMSFTfunction is defined as:XrResult xrGetSerializedSceneFragmentDataMSFT( XrSceneMSFT scene, const XrSerializedSceneFragmentDataGetInfoMSFT* getInfo, uint32_t countInput, uint32_t* readOutput, uint8_t* buffer);Description
The runtime must return
ERROR_SCENE_COMPONENT_ID_INVALID_MSFTif the given scene fragmentXrUuidMSFTwas not found.Valid Usage (Implicit)
- The
XR_MSFT_scene_understanding_serializationextension must be enabled prior to callingGetSerializedSceneFragmentDataMSFT scenemust be a validXrSceneMSFThandlegetInfomust be a pointer to a validXrSerializedSceneFragmentDataGetInfoMSFTstructurereadOutputmust be a pointer to auint32_tvalue- If
countInputis not 0,buffermust be a pointer to an array ofcountInputuint8_tvalues
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
scene- theXrSceneMSFThandle to read from.getInfo- a pointer to anXrSerializedSceneFragmentDataGetInfoMSFTstructure.readOutput- the number of bytes read.buffer- a pointer to the buffer where the data should be copied.
- The
-