FakePerceptionManager


class FakePerceptionManager


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

Deletes a persisted Anchor from local storage.

Public properties

MutableList<Anchor>

List of anchors created by this FakePerceptionManager.

Boolean

Flag to represent available tracking state of the camera.

open Hand?

Hand tracking information for the left Hand.

open Hand?

Hand tracking information for the right Hand.

open MutableList<Trackable>

Returns the list of all known trackables.

Public constructors

FakePerceptionManager

Added in 1.0.0-alpha05
FakePerceptionManager()

Public functions

addHitResult

Added in 1.0.0-alpha05
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-alpha05
fun addTrackable(trackable: Trackable): Unit

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

clearHitResults

Added in 1.0.0-alpha05
fun clearHitResults(): Unit

Removes all HitResult instances passed to addHitResult.

clearTrackables

Added in 1.0.0-alpha05
fun clearTrackables(): Unit

Removes all Trackable instances passed to addTrackable.

createAnchor

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

Defines a tracked location in the physical world.

detachAnchor

Added in 1.0.0-alpha05
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-alpha05
open fun getPersistedAnchorUuids(): List<UUID>

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

hitTest

Added in 1.0.0-alpha05
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-alpha05
open fun loadAnchor(uuid: UUID): Anchor

Loads an Anchor from local storage.

loadAnchorFromNativePointer

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

Loads an Anchor from a native pointer.

unpersistAnchor

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

Deletes a persisted Anchor from local storage.

Public properties

anchors

Added in 1.0.0-alpha05
val anchorsMutableList<Anchor>

List of anchors created by this FakePerceptionManager.

isTrackingAvailable

Added in 1.0.0-alpha05
var isTrackingAvailableBoolean

Flag to represent available tracking state of the camera.

leftHand

Added in 1.0.0-alpha05
open val leftHandHand?

Hand tracking information for the left Hand. Only available on supported platforms.

rightHand

Added in 1.0.0-alpha05
open val rightHandHand?

Hand tracking information for the right Hand. Only available on supported platforms.

trackables

Added in 1.0.0-alpha05
open val trackablesMutableList<Trackable>

Returns the list of all known trackables.