FakeRuntimeAnchor


public final class FakeRuntimeAnchor


Test-only implementation of RuntimeAnchor

Summary

Nested types

public static class FakeRuntimeAnchor.Companion

Constants

static final int

Limit for the number of anchors that can be created.

Public methods

void

Detaches this anchor from its Trackable.

static final int

The current number of anchors created.

@NonNull Anchor.PersistenceState

The PersistenceState for this anchor.

@NonNull Pose

The location of the anchor in the world coordinate space.

@NonNull TrackingState

The current state of the pose of this anchor.

UUID

The UUID that identifies this Anchor if it is persisted.

final boolean

Whether the anchor is attached to an AnchorHolder

final boolean

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

void

Generates a random UUID for the anchor and adds it to FakePerceptionManager.anchorUuids.

static final void
setAnchorsCreatedCount(int anchorsCreatedCount)

The current number of anchors created.

void

The PersistenceState for this anchor.

void

The location of the anchor in the world coordinate space.

void

The current state of the pose of this anchor.

void
setUuid(UUID uuid)

The UUID that identifies this Anchor if it is persisted.

Constants

ANCHOR_RESOURCE_LIMIT

public static final int ANCHOR_RESOURCE_LIMIT = 6

Limit for the number of anchors that can be created.

Public methods

detach

Added in 1.0.0-alpha05
public void detach()

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

getAnchorsCreatedCount

Added in 1.0.0-alpha05
public static final int getAnchorsCreatedCount()

The current number of anchors created.

getPersistenceState

Added in 1.0.0-alpha05
public @NonNull Anchor.PersistenceState getPersistenceState()

The PersistenceState for this anchor.

getPose

Added in 1.0.0-alpha05
public @NonNull Pose getPose()

The location of the anchor in the world coordinate space.

getTrackingState

Added in 1.0.0-alpha05
public @NonNull TrackingState getTrackingState()

The current state of the pose of this anchor.

getUuid

Added in 1.0.0-alpha05
public UUID getUuid()

The UUID that identifies this Anchor if it is persisted.

isAttached

Added in 1.0.0-alpha05
public final boolean isAttached()

Whether the anchor is attached to an AnchorHolder

isTrackingAvailable

Added in 1.0.0-alpha05
public final boolean isTrackingAvailable()

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

persist

Added in 1.0.0-alpha05
public void persist()

Generates a random UUID for the anchor and adds it to FakePerceptionManager.anchorUuids.

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

setAnchorsCreatedCount

Added in 1.0.0-alpha05
public static final void setAnchorsCreatedCount(int anchorsCreatedCount)

The current number of anchors created.

setPersistenceState

Added in 1.0.0-alpha05
public void setPersistenceState(@NonNull Anchor.PersistenceState persistenceState)

The PersistenceState for this anchor.

setPose

Added in 1.0.0-alpha05
public void setPose(@NonNull Pose pose)

The location of the anchor in the world coordinate space.

setTrackingState

Added in 1.0.0-alpha05
public void setTrackingState(@NonNull TrackingState trackingState)

The current state of the pose of this anchor.

setUuid

Added in 1.0.0-alpha05
public void setUuid(UUID uuid)

The UUID that identifies this Anchor if it is persisted.