FakePerceptionManager


class FakePerceptionManager


Test-only implementation of androidx.xr.arcore.internal.PerceptionManager used to validate state transitions.

Summary

Public constructors

Public functions

Unit
addHitResult(hitResult: HitResult)

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

Unit
addTrackable(trackable: Trackable)

Adds a androidx.xr.arcore.internal.Trackable to the list that is returned when calling trackables.

Unit

Removes all androidx.xr.arcore.internal.HitResult instances passed to addHitResult.

Unit

Removes all androidx.xr.arcore.internal.Trackable instances passed to addTrackable.

open Anchor

Defines a tracked location in the physical world.

open Unit

Detaches the given androidx.xr.arcore.internal.Anchor from this trackable.

open List<UUID>

Retrieves all the java.util.UUID instances from androidx.xr.arcore.internal.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 androidx.xr.arcore.internal.Anchor from local storage.

open Anchor

Loads an androidx.xr.arcore.internal.Anchor from a native pointer.

open Unit

Deletes a persisted androidx.xr.arcore.internal.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 DepthMap?

Left androidx.xr.arcore.internal.DepthMap's current frame information

open Hand?

Hand tracking information for the left androidx.xr.arcore.internal.Hand.

open DepthMap?

Mono androidx.xr.arcore.internal.DepthMap's current frame information

open DepthMap?

Right androidx.xr.arcore.internal.DepthMap's current frame information

open Hand?

Hand tracking information for the right androidx.xr.arcore.internal.Hand.

open MutableList<Trackable>

Returns the list of all known trackables.

Public constructors

FakePerceptionManager

Added in 1.0.0-alpha06
FakePerceptionManager()

Public functions

addHitResult

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

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

addTrackable

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

Adds a androidx.xr.arcore.internal.Trackable to the list that is returned when calling trackables.

clearHitResults

Added in 1.0.0-alpha06
fun clearHitResults(): Unit

Removes all androidx.xr.arcore.internal.HitResult instances passed to addHitResult.

clearTrackables

Added in 1.0.0-alpha06
fun clearTrackables(): Unit

Removes all androidx.xr.arcore.internal.Trackable instances passed to addTrackable.

createAnchor

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

Defines a tracked location in the physical world.

detachAnchor

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

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

getPersistedAnchorUuids

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

Retrieves all the java.util.UUID instances from androidx.xr.arcore.internal.Anchor objects that have been persisted.

hitTest

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

Loads an androidx.xr.arcore.internal.Anchor from local storage.

loadAnchorFromNativePointer

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

Loads an androidx.xr.arcore.internal.Anchor from a native pointer.

unpersistAnchor

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

Deletes a persisted androidx.xr.arcore.internal.Anchor from local storage.

Public properties

anchors

Added in 1.0.0-alpha06
val anchorsMutableList<Anchor>

List of anchors created by this FakePerceptionManager.

isTrackingAvailable

Added in 1.0.0-alpha06
var isTrackingAvailableBoolean

Flag to represent available tracking state of the camera.

leftDepthMap

Added in 1.0.0-alpha06
open val leftDepthMapDepthMap?

Left androidx.xr.arcore.internal.DepthMap's current frame information

leftHand

Added in 1.0.0-alpha06
open val leftHandHand?

Hand tracking information for the left androidx.xr.arcore.internal.Hand. Only available on supported platforms.

monoDepthMap

Added in 1.0.0-alpha06
open val monoDepthMapDepthMap?

Mono androidx.xr.arcore.internal.DepthMap's current frame information

rightDepthMap

Added in 1.0.0-alpha06
open val rightDepthMapDepthMap?

Right androidx.xr.arcore.internal.DepthMap's current frame information

rightHand

Added in 1.0.0-alpha06
open val rightHandHand?

Hand tracking information for the right androidx.xr.arcore.internal.Hand. Only available on supported platforms.

trackables

Added in 1.0.0-alpha06
open val trackablesMutableList<Trackable>

Returns the list of all known trackables.