JxrPlatformAdapter.StereoSurfaceEntity


interface JxrPlatformAdapter.StereoSurfaceEntity : JxrPlatformAdapter.Entity


Interface for a surface which images can be rendered into.

Summary

Public functions

JxrPlatformAdapter.Dimensions

Retrieves the dimensions of the "spatial canvas" which the surface is mapped to.

Int

Retrieves the StereoMode for this Entity.

Surface

Retrieves the surface that the Entity will display.

Unit

Specifies the shape of the spatial canvas which the surface is texture mapped to.

Unit

Specifies how the surface content will be routed for stereo viewing.

Inherited functions

From androidx.xr.scenecore.JxrPlatformAdapter.ActivityPose
Pose

Returns the pose for this entity, relative to the activity space root.

Vector3

Returns the scale of this WorldPose relative to the activity space.

Vector3

Returns the scale of this ActivityPose.

Pose

Returns a pose relative to this entity transformed into a pose relative to the destination.

From androidx.xr.scenecore.JxrPlatformAdapter.Entity
Unit

Add given Entity as child.

Unit

Sets the provided Entities to be children of the Entity.

Boolean

Add these components to entity.

Unit

Adds the listener to the set of active input listeners, for input events targeted to this entity or its child entities.

Unit

Dispose any system resources held by this entity, and transitively calls dispose() on all the children.

Float

Returns the total alpha transparency level for this Entity.

Float

Returns the set alpha transparency level for this Entity.

(Mutable)List<JxrPlatformAdapter.Entity!>

Returns the all child entities of this Entity.

JxrPlatformAdapter.Entity?

Returns the parent entity for this Entity.

Pose

Returns the pose for this entity, relative to its parent.

Vector3

Returns the scale of this entity, relative to its parent.

Boolean
isHidden(includeParents: Boolean)

Returns the hidden status of this Entity.

Unit

Remove all components from this entity.

Unit

Remove the given component from the entity.

Unit

Removes the given listener from the set of active input listeners.

Unit
setAlpha(alpha: Float)

Sets the alpha transparency for the given Entity.

Unit

Sets context-text for this entity to be consumed by Accessibility systems.

Unit
setHidden(hidden: Boolean)

Sets the local hidden state of this Entity.

Unit

Sets the parent Entity for this Entity.

Unit
setPose(pose: Pose)

Updates the pose (position and rotation) of the Entity relative to its parent.

Unit
setScale(scale: Vector3)

Sets the scale of this entity relative to its parent.

Unit

Sets the size for the given Entity.

Public functions

getDimensions

Added in 1.0.0-alpha02
fun getDimensions(): JxrPlatformAdapter.Dimensions

Retrieves the dimensions of the "spatial canvas" which the surface is mapped to. These values are not impacted by scale.

Returns
JxrPlatformAdapter.Dimensions

The canvas [Dimensions].

getStereoMode

Added in 1.0.0-alpha02
fun getStereoMode(): Int

Retrieves the StereoMode for this Entity.

Returns
Int

An int StereoMode

getSurface

Added in 1.0.0-alpha02
fun getSurface(): Surface

Retrieves the surface that the Entity will display. The app can write into this surface however it wants, i.e. MediaPlayer, ExoPlayer, or custom rendering.

Returns
Surface

an Android [Surface]

setCanvasShape

Added in 1.0.0-alpha02
fun setCanvasShape(
    canvasShape: JxrPlatformAdapter.StereoSurfaceEntity.CanvasShape
): Unit

Specifies the shape of the spatial canvas which the surface is texture mapped to.

Parameters
canvasShape: JxrPlatformAdapter.StereoSurfaceEntity.CanvasShape

A concrete instance of [CanvasShape].

setStereoMode

Added in 1.0.0-alpha02
fun setStereoMode(mode: Int): Unit

Specifies how the surface content will be routed for stereo viewing. Applications must render into the surface in accordance with what is specified here in order for the compositor to correctly produce a stereoscopic view to the user.

Parameters
mode: Int

An int StereoMode