public interface MoveListener


Listener for move actions. Callbacks are invoked as user interacts with the entity.

Summary

Public methods

default void
onMoveEnd(
    @NonNull Entity entity,
    @NonNull Ray finalInputRay,
    @NonNull Pose finalPose,
    float finalScale,
    Entity updatedParent
)

Called when the user has finished moving the entity.

default void
onMoveStart(
    @NonNull Entity entity,
    @NonNull Ray initialInputRay,
    @NonNull Pose initialPose,
    float initialScale,
    @NonNull Entity initialParent
)

Called when the user starts moving the entity.

default void
onMoveUpdate(
    @NonNull Entity entity,
    @NonNull Ray currentInputRay,
    @NonNull Pose currentPose,
    float currentScale
)

Called continuously while the user is moving the entity.

Public methods

onMoveEnd

Added in 1.0.0-alpha01
default void onMoveEnd(
    @NonNull Entity entity,
    @NonNull Ray finalInputRay,
    @NonNull Pose finalPose,
    float finalScale,
    Entity updatedParent
)

Called when the user has finished moving the entity.

Parameters
@NonNull Entity entity

The entity being moved.

@NonNull Ray finalInputRay

Ray for the user's input at the final update.

@NonNull Pose finalPose

Pose of the entity during this event relative to its parent.

float finalScale

Scale of the entity during this event.

Entity updatedParent

If anchorPlacement is set, the entity may have a new parent when the movement completes. This will be a new AnchorEntity, if it was anchored or re-anchored during the movement, or the activity space, if it was unanchored. This will be null if there was no updated parent on the entity.

onMoveStart

Added in 1.0.0-alpha01
default void onMoveStart(
    @NonNull Entity entity,
    @NonNull Ray initialInputRay,
    @NonNull Pose initialPose,
    float initialScale,
    @NonNull Entity initialParent
)

Called when the user starts moving the entity.

Parameters
@NonNull Entity entity

The entity being moved.

@NonNull Ray initialInputRay

Ray for the user's input at initial update.

@NonNull Pose initialPose

Initial Pose of the entity relative to its parent.

float initialScale

Initial scale of the entity.

@NonNull Entity initialParent

Initial parent of the entity.

onMoveUpdate

Added in 1.0.0-alpha01
default void onMoveUpdate(
    @NonNull Entity entity,
    @NonNull Ray currentInputRay,
    @NonNull Pose currentPose,
    float currentScale
)

Called continuously while the user is moving the entity.

Parameters
@NonNull Entity entity

The entity being moved.

@NonNull Ray currentInputRay

Ray for the user's input at the new update.

@NonNull Pose currentPose

Pose of the entity during this event relative to its parent.

float currentScale

Scale of the entity during this event.