JxrPlatformAdapter.AnchorEntity


interface JxrPlatformAdapter.AnchorEntity : JxrPlatformAdapter.SystemSpaceEntity


Interface for Anchor entity.

Summary

Nested types

Interface for listening to Anchor state changes.

Specifies the current persistence state of the Anchor.

Interface for listening to Anchor persist state changes.

Specifies the current tracking state of the Anchor.

Public functions

JxrPlatformAdapter.AnchorEntity.PersistState

Returns the current persist state of the anchor synchronously.

JxrPlatformAdapter.AnchorEntity.State
Long

Returns the native pointer of the anchor.

UUID?

Persists the anchor.

Unit

Registers a listener to be called when the persist state of the anchor changes.

Unit

Registers a listener to be called when the state of the anchor changes.

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
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!>
JxrPlatformAdapter.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
Unit
setHidden(hidden: Boolean)

Sets the local hidden state of this Entity.

Unit
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.

From androidx.xr.scenecore.JxrPlatformAdapter.SystemSpaceEntity
Unit

Registers a listener to be called when the underlying space has moved or changed.

Public functions

getPersistState

Added in 1.0.0-alpha01
fun getPersistState(): JxrPlatformAdapter.AnchorEntity.PersistState

Returns the current persist state of the anchor synchronously.

nativePointer

Added in 1.0.0-alpha01
fun nativePointer(): Long

Returns the native pointer of the anchor.

persist

Added in 1.0.0-alpha01
fun persist(): UUID?

Persists the anchor. If the query is sent to perception service successful returns an UUID, which could be used retrieve the anchor. Otherwise, return null.

registerPersistStateChangeListener

Added in 1.0.0-alpha01
fun registerPersistStateChangeListener(
    persistStateChangeListener: JxrPlatformAdapter.AnchorEntity.PersistStateChangeListener
): Unit

Registers a listener to be called when the persist state of the anchor changes.

setOnStateChangedListener

Added in 1.0.0-alpha01
fun setOnStateChangedListener(
    onStateChangedListener: JxrPlatformAdapter.AnchorEntity.OnStateChangedListener?
): Unit

Registers a listener to be called when the state of the anchor changes.