FakeRuntimeAnchor


public final class FakeRuntimeAnchor


Test-only implementation of RuntimeAnchor

Summary

Nested types

public static class FakeRuntimeAnchor.Companion

Constants

static final int

Public constructors

FakeRuntimeAnchor(@NonNull Pose pose, AnchorHolder anchorHolder)

Public methods

void

Detaches this anchor from its Trackable.

final AnchorHolder
@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

void

Sends a request to persist this anchor.

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 = 5

Public constructors

FakeRuntimeAnchor

Added in 1.0.0-alpha02
public FakeRuntimeAnchor(@NonNull Pose pose, AnchorHolder anchorHolder)

Public methods

detach

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

getAnchorHolder

Added in 1.0.0-alpha02
public final AnchorHolder getAnchorHolder()

getPersistenceState

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

The PersistenceState for this anchor.

getPose

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

The location of the anchor in the world coordinate space.

getTrackingState

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

The current state of the pose of this anchor.

getUuid

Added in 1.0.0-alpha02
public UUID getUuid()

The UUID that identifies this Anchor if it is persisted.

isAttached

Added in 1.0.0-alpha02
public final boolean isAttached()

Whether the anchor is attached to an AnchorHolder

persist

Added in 1.0.0-alpha02
public void persist()

Sends a request to persist this anchor. The value of persistenceState will be updated based on the progress of this operation. The value of uuid will be set if the operation is successful.

setPersistenceState

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

The PersistenceState for this anchor.

setPose

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

The location of the anchor in the world coordinate space.

setTrackingState

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

The current state of the pose of this anchor.

setUuid

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

The UUID that identifies this Anchor if it is persisted.