public final class SpatialUser


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

Summary

Public constructors

SpatialUser(
    @NonNull LifecycleManager lifecycleManager,
    @NonNull JxrPlatformAdapter runtime
)

Public methods

final CameraView

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

final @NonNull List<@NonNull CameraView>

Returns a list of CameraViews that the user is using.

final Head

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

final void
setHead(Head head)

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

Public constructors

SpatialUser

Added in 1.0.0-alpha04
public SpatialUser(
    @NonNull LifecycleManager lifecycleManager,
    @NonNull JxrPlatformAdapter runtime
)
Parameters
@NonNull LifecycleManager lifecycleManager

The LifecycleManager for the Session.

@NonNull JxrPlatformAdapter runtime

The JxrPlatformAdapter for the Session.

Public methods

getCameraView

Added in 1.0.0-alpha04
public final CameraView getCameraView(@NonNull CameraView.CameraType cameraType)

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
public final @NonNull List<@NonNull CameraViewgetCameraViews()

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.

getHead

Added in 1.0.0-alpha04
public final Head getHead()

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.

setHead

Added in 1.0.0-alpha04
public final void setHead(Head head)

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.