FakePerceptionManager


public final class FakePerceptionManager implements AnchorHolder


Test-only implementation of PerceptionManager used to validate state transitions.

Summary

Public constructors

Public methods

final void

Adds a HitResult to the list that is returned when calling hitTest with any pose.

final void

Adds a Trackable to the list that is returned when calling trackables.

final void

Removes all HitResult instances passed to addHitResult.

final void

Removes all Trackable instances passed to addTrackable.

@NonNull Anchor

Defines a tracked location in the physical world.

void

Detaches the given Anchor from this trackable.

final @NonNull List<@NonNull Anchor>
@NonNull List<@NonNull UUID>

Retrieves all the UUID instances from Anchor objects that have been persisted.

@NonNull List<@NonNull Trackable>

Returns the list of all known trackables.

@NonNull List<@NonNull HitResult>

Performs a ray cast in the direction of the given ray in the latest camera view.

@NonNull Anchor

Loads an Anchor from local storage.

@NonNull Anchor
loadAnchorFromNativePointer(long nativePointer)

Loads an Anchor from a native pointer.

void

Notifies the AnchorHolder that the given Anchor has been persisted.

void

Deletes a persisted Anchor from local storage.

Public constructors

FakePerceptionManager

Added in 1.0.0-alpha01
public FakePerceptionManager()

Public methods

addHitResult

Added in 1.0.0-alpha01
public final void addHitResult(@NonNull HitResult hitResult)

Adds a HitResult to the list that is returned when calling hitTest with any pose.

addTrackable

Added in 1.0.0-alpha01
public final void addTrackable(@NonNull Trackable trackable)

Adds a Trackable to the list that is returned when calling trackables.

clearHitResults

Added in 1.0.0-alpha01
public final void clearHitResults()

Removes all HitResult instances passed to addHitResult.

clearTrackables

Added in 1.0.0-alpha01
public final void clearTrackables()

Removes all Trackable instances passed to addTrackable.

createAnchor

Added in 1.0.0-alpha01
public @NonNull Anchor createAnchor(@NonNull Pose pose)

Defines a tracked location in the physical world.

detachAnchor

Added in 1.0.0-alpha01
public void detachAnchor(@NonNull Anchor anchor)

Detaches the given Anchor from this trackable. Single Anchor instances rely on this function to remove themselves from the AnchorHolder.

getAnchors

Added in 1.0.0-alpha01
public final @NonNull List<@NonNull AnchorgetAnchors()

getPersistedAnchorUuids

Added in 1.0.0-alpha01
public @NonNull List<@NonNull UUIDgetPersistedAnchorUuids()

Retrieves all the UUID instances from Anchor objects that have been persisted.

getTrackables

Added in 1.0.0-alpha01
public @NonNull List<@NonNull TrackablegetTrackables()

Returns the list of all known trackables.

hitTest

Added in 1.0.0-alpha01
public @NonNull List<@NonNull HitResulthitTest(@NonNull Ray ray)

Performs a ray cast in the direction of the given ray in the latest camera view.

loadAnchor

Added in 1.0.0-alpha01
public @NonNull Anchor loadAnchor(@NonNull UUID uuid)

Loads an Anchor from local storage.

loadAnchorFromNativePointer

Added in 1.0.0-alpha01
public @NonNull Anchor loadAnchorFromNativePointer(long nativePointer)

Loads an Anchor from a native pointer.

persistAnchor

Added in 1.0.0-alpha01
public void persistAnchor(@NonNull Anchor anchor)

Notifies the AnchorHolder that the given Anchor has been persisted.

unpersistAnchor

Added in 1.0.0-alpha01
public void unpersistAnchor(@NonNull UUID uuid)

Deletes a persisted Anchor from local storage.