SpatialMLSession

@RequiresApi(value = 27)
class SpatialMLSession : BaseHandle

A handle to each session of SpatialML framework usage. For each session, a dedicated SpatialML container for securely rendering mixed-reality components will be allocated.

One session handle must be linked to a SpatialMLInstance, on which the framework session's lifecycle depends.

Parameters

instance

the SpatialMLInstance the session is associated with.

config

the configuration during initialization.

Throws

If the usage is not allowed by the SpatialML run-time Framework, or if the framework encounter internal error and cannot perform the requested behavior.

Types

Link copied to clipboard
object Companion

Companion for SpatialMLSession.

Link copied to clipboard
class InitInfo(val imageWidth: Int, val imageHeight: Int, val containerWidth: Int, val containerHeight: Int, val containerDepth: Int)

Configuration structure for framework session handle.

Properties

Link copied to clipboard

The BaseHandle's implementation's destructor.

Functions

Link copied to clipboard

Create new global tensors within the context of current framework session.

Link copied to clipboard

Create a new pipeline within the context of current framework session.

Link copied to clipboard
fun newSceneFromGLTF(gltfSceneMemory: SharedMemory): GlobalTensor

Create an SpatialML scene from a glTF file already loaded into SharedMemory.

fun newSceneFromGLTF(gltfSceneAsset: String): GlobalTensor

Create an SpatialML scene from a glTF file in asset.

Link copied to clipboard
suspend fun newSceneFromGLTFSuspend(gltfSceneAsset: String): GlobalTensor

Async version of newSceneFromGLTF.