FakeRuntimeAnchor


class FakeRuntimeAnchor


Test-only implementation of androidx.xr.arcore.internal.Anchor

Summary

Constants

const Int

Limit for the number of anchors that can be created.

Public companion properties

Int

The current number of anchors created.

Public functions

open Unit

Detaches this anchor from its Trackable.

open Unit

Generates a random UUID for the anchor and adds it to androidx.xr.runtime.testing.FakePerceptionManager.anchorUuids.

Public properties

Boolean

Whether the anchor is attached to an AnchorHolder

Boolean

Flag to represent available tracking state of the camera when creating the anchor.

open Anchor.PersistenceState

The PersistenceState for this anchor.

open Pose

The location of the anchor in the world coordinate space.

open TrackingState

The current state of the pose of this anchor.

open UUID?

The java.util.UUID that identifies this Anchor if it is persisted.

Constants

ANCHOR_RESOURCE_LIMIT

const val ANCHOR_RESOURCE_LIMIT = 6: Int

Limit for the number of anchors that can be created.

Public companion properties

anchorsCreatedCount

Added in 1.0.0-alpha06
var anchorsCreatedCountInt

The current number of anchors created.

Public functions

detach

Added in 1.0.0-alpha06
open fun detach(): Unit

Detaches this anchor from its Trackable. After detaching, the anchor will not be updated anymore and cannot be reattached to another trackable.

persist

Added in 1.0.0-alpha06
open fun persist(): Unit

Generates a random UUID for the anchor and adds it to androidx.xr.runtime.testing.FakePerceptionManager.anchorUuids.

This function will only be added to the list of anchors returned by androidx.xr.runtime.testing.FakePerceptionManager.getPersistedAnchorUuids if the anchorHolder is a androidx.xr.runtime.testing.FakePerceptionManager.

Public properties

isAttached

Added in 1.0.0-alpha06
val isAttachedBoolean

Whether the anchor is attached to an AnchorHolder

isTrackingAvailable

Added in 1.0.0-alpha06
val isTrackingAvailableBoolean

Flag to represent available tracking state of the camera when creating the anchor.

persistenceState

Added in 1.0.0-alpha06
open var persistenceStateAnchor.PersistenceState

The PersistenceState for this anchor.

pose

Added in 1.0.0-alpha06
open var posePose

The location of the anchor in the world coordinate space.

trackingState

Added in 1.0.0-alpha06
open var trackingStateTrackingState

The current state of the pose of this anchor.

uuid

Added in 1.0.0-alpha06
open var uuidUUID?

The java.util.UUID that identifies this Anchor if it is persisted.