public final 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

public final class Depth.State

Contains the current state of depth tracking.

Public methods

final @NonNull StateFlow<@NonNull Depth.State>

the current State of the depth data.

static final Depth
left(@NonNull Session session)

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

static final Depth
mono(@NonNull Session session)

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

static final Depth
right(@NonNull Session session)

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

Public methods

getState

Added in 1.0.0-alpha14
public final @NonNull StateFlow<@NonNull Depth.StategetState()

the current State of the depth data.

left

Added in 1.0.0-alpha14
public static final Depth left(@NonNull Session session)

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
@NonNull Session session

the currently active Session

mono

Added in 1.0.0-alpha14
public static final Depth mono(@NonNull Session session)

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
@NonNull Session session

the currently active Session

right

Added in 1.0.0-alpha14
public static final Depth right(@NonNull Session session)

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
@NonNull Session session

the currently active Session