JxrPlatformAdapter.StereoSurfaceEntity


public interface JxrPlatformAdapter.StereoSurfaceEntity extends JxrPlatformAdapter.Entity


Interface for a surface which images can be rendered into.

Summary

Nested types

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

A 2D rectangle-shaped canvas.

A hemisphere-shaped canvas.

A sphere-shaped canvas.

Public methods

abstract @NonNull JxrPlatformAdapter.Dimensions

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

abstract int

Retrieves the StereoMode for this Entity.

abstract @NonNull Surface

Retrieves the surface that the Entity will display.

abstract void

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

abstract void
setStereoMode(int mode)

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

Inherited methods

From androidx.xr.scenecore.JxrPlatformAdapter.ActivityPose
abstract @NonNull Pose

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

abstract @NonNull Vector3

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

abstract @NonNull Vector3

Returns the scale of this ActivityPose.

abstract @NonNull Pose

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

From androidx.xr.scenecore.JxrPlatformAdapter.Entity
abstract void

Add given Entity as child.

abstract void

Sets the provided Entities to be children of the Entity.

abstract boolean

Add these components to entity.

abstract void

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

abstract void

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

abstract float

Returns the total alpha transparency level for this Entity.

abstract float

Returns the set alpha transparency level for this Entity.

abstract @NonNull List<JxrPlatformAdapter.Entity>

Returns the all child entities of this Entity.

abstract @Nullable JxrPlatformAdapter.Entity

Returns the parent entity for this Entity.

abstract @NonNull Pose

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

abstract @NonNull Vector3

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

abstract boolean
isHidden(boolean includeParents)

Returns the hidden status of this Entity.

abstract void

Remove all components from this entity.

abstract void

Remove the given component from the entity.

abstract void

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

abstract void
setAlpha(float alpha)

Sets the alpha transparency for the given Entity.

abstract void

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

abstract void
setHidden(boolean hidden)

Sets the local hidden state of this Entity.

abstract void

Sets the parent Entity for this Entity.

abstract void

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

abstract void

Sets the scale of this entity relative to its parent.

abstract void

Sets the size for the given Entity.

Public methods

getDimensions

Added in 1.0.0-alpha02
abstract @NonNull JxrPlatformAdapter.Dimensions getDimensions()

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

Returns
@NonNull JxrPlatformAdapter.Dimensions

The canvas [Dimensions].

getStereoMode

Added in 1.0.0-alpha02
abstract int getStereoMode()

Retrieves the StereoMode for this Entity.

Returns
int

An int StereoMode

getSurface

Added in 1.0.0-alpha02
abstract @NonNull Surface getSurface()

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
@NonNull Surface

an Android [Surface]

setCanvasShape

Added in 1.0.0-alpha02
abstract void setCanvasShape(
    @NonNull JxrPlatformAdapter.StereoSurfaceEntity.CanvasShape canvasShape
)

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

Parameters
@NonNull JxrPlatformAdapter.StereoSurfaceEntity.CanvasShape canvasShape

A concrete instance of [CanvasShape].

setStereoMode

Added in 1.0.0-alpha02
abstract void setStereoMode(int mode)

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
int mode

An int StereoMode