JxrPlatformAdapter.AnchorEntity


public interface JxrPlatformAdapter.AnchorEntity extends 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 methods

abstract @NonNull JxrPlatformAdapter.AnchorEntity.PersistState

Returns the current persist state of the anchor synchronously.

abstract @NonNull JxrPlatformAdapter.AnchorEntity.State
abstract long

Returns the native pointer of the anchor.

abstract @Nullable UUID

Persists the anchor.

abstract void

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

abstract void

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

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
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>
abstract @Nullable JxrPlatformAdapter.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
abstract void
setHidden(boolean hidden)

Sets the local hidden state of this Entity.

abstract void
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.

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

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

Public methods

getPersistState

Added in 1.0.0-alpha01
abstract @NonNull JxrPlatformAdapter.AnchorEntity.PersistState getPersistState()

Returns the current persist state of the anchor synchronously.

nativePointer

Added in 1.0.0-alpha01
abstract long nativePointer()

Returns the native pointer of the anchor.

persist

Added in 1.0.0-alpha01
abstract @Nullable UUID persist()

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
abstract void registerPersistStateChangeListener(
    @NonNull JxrPlatformAdapter.AnchorEntity.PersistStateChangeListener persistStateChangeListener
)

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

setOnStateChangedListener

Added in 1.0.0-alpha01
abstract void setOnStateChangedListener(
    @Nullable JxrPlatformAdapter.AnchorEntity.OnStateChangedListener onStateChangedListener
)

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