FakeActivityPose


public class FakeActivityPose

Known direct subclasses
FakeEntity

Test-only implementation of Entity


Test-only implementation of ActivityPose

Summary

Public constructors

Public methods

@NonNull Pose

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

@NonNull Vector3

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

@NonNull Vector3

Returns the scale of this ActivityPose.

@NonNull ListenableFuture<@NonNull HitTestResult>
hitTest(
    @NonNull Vector3 origin,
    @NonNull Vector3 direction,
    int hitTestFilter
)

Creates a hit test at the from the specified origin in the specified direction into the scene.

@NonNull Pose

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

Public constructors

FakeActivityPose

Added in 1.0.0-alpha04
public FakeActivityPose()

Public methods

getActivitySpacePose

Added in 1.0.0-alpha04
public @NonNull Pose getActivitySpacePose()

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

getActivitySpaceScale

Added in 1.0.0-alpha04
public @NonNull Vector3 getActivitySpaceScale()

Returns the scale of this WorldPose relative to the activity space. This returns the accumulated scale which includes the parent's scale, but does not include the scale of the activity space itself.

Returns
@NonNull Vector3

Total Vector3 scale applied to self and children relative to the activity space.

getWorldSpaceScale

Added in 1.0.0-alpha04
public @NonNull Vector3 getWorldSpaceScale()

Returns the scale of this ActivityPose. For base ActivityPoses, the scale is (1,1,1). For entities this returns the accumulated scale. This value includes the parent's scale, and is similar to a ActivitySpace scale.

Returns
@NonNull Vector3

Total Vector3 scale applied to self and children.

hitTest

Added in 1.0.0-alpha04
public @NonNull ListenableFuture<@NonNull HitTestResulthitTest(
    @NonNull Vector3 origin,
    @NonNull Vector3 direction,
    int hitTestFilter
)

Creates a hit test at the from the specified origin in the specified direction into the scene.

Parameters
@NonNull Vector3 origin

The translation of the origin of the hit test relative to this ActivityPose.

@NonNull Vector3 direction

The direction for the hit test ray from the ActivityPose.

int hitTestFilter

The scenes that will be in range for the hit test.

Returns
@NonNull ListenableFuture<@NonNull HitTestResult>

a {@code ListenableFuture}. The HitResult describes if it hit something and where relative to this ActivityPose. Listeners will be called on the main thread if Runnable::run is supplied.

transformPoseTo

Added in 1.0.0-alpha04
public @NonNull Pose transformPoseTo(@NonNull Pose pose, @NonNull ActivityPose destination)

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

Parameters
@NonNull Pose pose

A pose in this entity's local coordinate space.

@NonNull ActivityPose destination

The entity which the returned pose will be relative to.

Returns
@NonNull Pose

The pose relative to the destination entity.