FakePerceptionManager


class FakePerceptionManager : AnchorHolder


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

Summary

Public constructors

Public functions

Unit
addHitResult(hitResult: HitResult)

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

Unit
addTrackable(trackable: Trackable)

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

Unit

Removes all HitResult instances passed to addHitResult.

Unit

Removes all Trackable instances passed to addTrackable.

open Anchor

Defines a tracked location in the physical world.

open Unit

Detaches the given Anchor from this trackable.

open List<UUID>

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

open MutableList<HitResult>
hitTest(ray: Ray)

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

open Anchor

Loads an Anchor from local storage.

open Anchor

Loads an Anchor from a native pointer.

open Unit

Notifies the AnchorHolder that the given Anchor has been persisted.

open Unit

Deletes a persisted Anchor from local storage.

Public properties

MutableList<Anchor>
open MutableList<Trackable>

Returns the list of all known trackables.

Public constructors

FakePerceptionManager

Added in 1.0.0-alpha01
FakePerceptionManager()

Public functions

addHitResult

Added in 1.0.0-alpha01
fun addHitResult(hitResult: HitResult): Unit

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

addTrackable

Added in 1.0.0-alpha01
fun addTrackable(trackable: Trackable): Unit

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

clearHitResults

Added in 1.0.0-alpha01
fun clearHitResults(): Unit

Removes all HitResult instances passed to addHitResult.

clearTrackables

Added in 1.0.0-alpha01
fun clearTrackables(): Unit

Removes all Trackable instances passed to addTrackable.

createAnchor

Added in 1.0.0-alpha01
open fun createAnchor(pose: Pose): Anchor

Defines a tracked location in the physical world.

detachAnchor

Added in 1.0.0-alpha01
open fun detachAnchor(anchor: Anchor): Unit

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

getPersistedAnchorUuids

Added in 1.0.0-alpha01
open fun getPersistedAnchorUuids(): List<UUID>

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

hitTest

Added in 1.0.0-alpha01
open fun hitTest(ray: Ray): MutableList<HitResult>

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

loadAnchor

Added in 1.0.0-alpha01
open fun loadAnchor(uuid: UUID): Anchor

Loads an Anchor from local storage.

loadAnchorFromNativePointer

Added in 1.0.0-alpha01
open fun loadAnchorFromNativePointer(nativePointer: Long): Anchor

Loads an Anchor from a native pointer.

persistAnchor

Added in 1.0.0-alpha01
open fun persistAnchor(anchor: Anchor): Unit

Notifies the AnchorHolder that the given Anchor has been persisted.

unpersistAnchor

Added in 1.0.0-alpha01
open fun unpersistAnchor(uuid: UUID): Unit

Deletes a persisted Anchor from local storage.

Public properties

anchors

Added in 1.0.0-alpha01
val anchorsMutableList<Anchor>

trackables

Added in 1.0.0-alpha01
open val trackablesMutableList<Trackable>

Returns the list of all known trackables.