RenderViewpoint


class RenderViewpoint


Represents a single viewpoint used for rendering, such as a left eye, right eye, or a mono view.

This class provides access to the State of a specific render viewpoint, including its pose, localPose, and fieldOfView.

Summary

Nested types

Class that contains the current state of the render viewpoint.

Public companion functions

RenderViewpoint
left(session: Session)

Returns the RenderViewpoint associated with the left display.

RenderViewpoint
mono(session: Session)

Returns the RenderViewpoint associated with the single device display.

RenderViewpoint
right(session: Session)

Returns the RenderViewpoint associated with the right display.

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public properties

StateFlow<RenderViewpoint.State>

the current State of the render viewpoint

Public companion functions

left

Added in 1.0.0-alpha15
fun left(session: Session): RenderViewpoint

Returns the RenderViewpoint associated with the left display.

Parameters
session: Session

the currently active Session

Throws
IllegalStateException

if the device does not support androidx.xr.runtime.RenderingMode.STEREO

mono

Added in 1.0.0-alpha15
fun mono(session: Session): RenderViewpoint

Returns the RenderViewpoint associated with the single device display.

When the device supports androidx.xr.runtime.RenderingMode.MONO, this will return the render viewpoint for that display. When the device uses androidx.xr.runtime.RenderingMode.STEREO, this will return the render viewpoint for the center of the two displays.

Parameters
session: Session

the currently active Session

right

Added in 1.0.0-alpha15
fun right(session: Session): RenderViewpoint

Returns the RenderViewpoint associated with the right display.

Parameters
session: Session

the currently active Session

Throws
IllegalStateException

if the device does not support androidx.xr.runtime.RenderingMode.STEREO

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

state

Added in 1.0.0-alpha15
val stateStateFlow<RenderViewpoint.State>

the current State of the render viewpoint