class Depth


Contains the depth information corresponding to a specific RenderViewpoint.

The availability of depth data depends on the DepthEstimationMode set in Session.config, which also allows it to be turned off by setting it to DepthEstimationMode.DISABLED.

Update frequency and the dimensions of the maps provided are system-defined. The buffer lifecycles are controlled by the runtime so if the data will not be used upon receiving, a copy should be made.

Summary

Nested types

Contains the current state of depth tracking.

Public companion functions

Depth?
left(session: Session)

Returns the Depth data associated with the left display depending on the DepthEstimationMode set in Session.config.

Depth?
mono(session: Session)

Returns the Depth associated with the single device display depending on the DepthEstimationMode set in Session.config.

Depth?
right(session: Session)

Returns the Depth data associated with the right display depending on the DepthEstimationMode set in Session.config.

Public properties

StateFlow<Depth.State>

the current State of the depth data.

Public companion functions

left

Added in 1.0.0-alpha14
fun left(session: Session): Depth?

Returns the Depth data associated with the left display depending on the DepthEstimationMode set in Session.config.

Supported only on devices that use stereo displays for rendering.

Parameters
session: Session

the currently active Session

mono

Added in 1.0.0-alpha14
fun mono(session: Session): Depth?

Returns the Depth associated with the single device display depending on the DepthEstimationMode set in Session.config.

Supported only on devices that use a monocular display for rendering.

Parameters
session: Session

the currently active Session

right

Added in 1.0.0-alpha14
fun right(session: Session): Depth?

Returns the Depth data associated with the right display depending on the DepthEstimationMode set in Session.config.

Supported only on devices that use stereo displays for rendering.

Parameters
session: Session

the currently active Session

Public properties

state

Added in 1.0.0-alpha14
val stateStateFlow<Depth.State>

the current State of the depth data.