class SpatialUser


The User object is used to retrieve information about the user. This includes the Head and The CameraViews.

Summary

Public constructors

SpatialUser(
    lifecycleManager: LifecycleManager,
    runtime: JxrPlatformAdapter
)

Public functions

CameraView?

Returns a CameraView for the specified CameraType or null if it is not available.

List<CameraView>

Returns a list of CameraViews that the user is using.

Public properties

Head?

Returns a Head for the SpatialUser or null if it is not yet available.

Public constructors

SpatialUser

Added in 1.0.0-alpha04
SpatialUser(
    lifecycleManager: LifecycleManager,
    runtime: JxrPlatformAdapter
)
Parameters
lifecycleManager: LifecycleManager

The LifecycleManager for the Session.

runtime: JxrPlatformAdapter

The JxrPlatformAdapter for the Session.

Public functions

getCameraView

Added in 1.0.0-alpha04
fun getCameraView(cameraType: CameraView.CameraType): CameraView?

Returns a CameraView for the specified CameraType or null if it is not available.

Throws
kotlin.IllegalStateException

if session.config.headTracking is set to HeadTrackingMode.Disabled.

getCameraViews

Added in 1.0.0-alpha04
fun getCameraViews(): List<CameraView>

Returns a list of CameraViews that the user is using. The length of the list is dependent on the device type. The list will be empty if the cameras are not yet available.

Throws
kotlin.IllegalStateException

if session.config.headTracking is set to HeadTrackingMode.Disabled.

Public properties

head

Added in 1.0.0-alpha04
var headHead?

Returns a Head for the SpatialUser or null if it is not yet available.

Throws
kotlin.IllegalStateException

if session.config.headTracking is set to HeadTrackingMode.Disabled.