FakePerceptionManager


class FakePerceptionManager


Fake 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 Unit

Deletes a persisted Anchor from local storage.

Public properties

MutableList<Anchor>

a MutableList of FakeRuntimeAnchors created

Boolean

a flag to represent available tracking state of the camera

open DepthMap?

the left DepthMap as a FakeRuntimeDepthMap

open Hand?

the left Hand as a FakeRuntimeHand

open DepthMap?

the mono DepthMap as a FakeRuntimeDepthMap

open DepthMap?

the right DepthMap as a FakeRuntimeDepthMap

open Hand?

the right Hand as a FakeRuntimeHand

open MutableList<Trackable>

the Collection of all known Trackables

Public constructors

FakePerceptionManager

Added in 1.0.0-alpha12
FakePerceptionManager()

Public functions

addHitResult

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

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

Parameters
hitResult: HitResult

the HitResult to add

addTrackable

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

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

Parameters
trackable: Trackable

the Trackable to add

clearHitResults

Added in 1.0.0-alpha12
fun clearHitResults(): Unit

Removes all HitResult instances passed to addHitResult.

clearTrackables

Added in 1.0.0-alpha12
fun clearTrackables(): Unit

Removes all Trackable instances passed to addTrackable.

createAnchor

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

Defines a tracked location in the physical world.

Parameters
pose: Pose

the Pose of the anchor

Returns
Anchor

the created Anchor

detachAnchor

Added in 1.0.0-alpha12
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.

Parameters
anchor: Anchor

the Anchor to detach

getPersistedAnchorUuids

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

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

Returns
List<UUID>

a list of UUIDs

hitTest

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

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

Parameters
ray: Ray

the Ray to cast

Returns
MutableList<HitResult>

a list of HitResult objects

loadAnchor

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

Loads an Anchor from local storage.

Parameters
uuid: UUID

the UUID of the anchor to load

Returns
Anchor

the loaded Anchor

unpersistAnchor

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

Deletes a persisted Anchor from local storage.

Parameters
uuid: UUID

the UUID of the anchor to unpersist

Public properties

anchors

Added in 1.0.0-alpha12
val anchorsMutableList<Anchor>

a MutableList of FakeRuntimeAnchors created

isTrackingAvailable

Added in 1.0.0-alpha12
var isTrackingAvailableBoolean

a flag to represent available tracking state of the camera

leftDepthMap

Added in 1.0.0-alpha12
open val leftDepthMapDepthMap?

the left DepthMap as a FakeRuntimeDepthMap

leftHand

Added in 1.0.0-alpha12
open val leftHandHand?

the left Hand as a FakeRuntimeHand

monoDepthMap

Added in 1.0.0-alpha12
open val monoDepthMapDepthMap?

the mono DepthMap as a FakeRuntimeDepthMap

rightDepthMap

Added in 1.0.0-alpha12
open val rightDepthMapDepthMap?

the right DepthMap as a FakeRuntimeDepthMap

rightHand

Added in 1.0.0-alpha12
open val rightHandHand?

the right Hand as a FakeRuntimeHand

trackables

Added in 1.0.0-alpha12
open val trackablesMutableList<Trackable>

the Collection of all known Trackables