FakeRuntimeAnchor


public final class FakeRuntimeAnchor


Fake implementation of Anchor for testing purposes.

Summary

Nested types

public static class FakeRuntimeAnchor.Companion

Public methods

void

Detaches this anchor from its Trackable.

static final int

Limit for the number of anchors that can be created.

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

a 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

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 value)

the UUID that identifies this Anchor if it is persisted

Public methods

detach

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

getAnchorResourceLimit

Added in 1.0.0-alpha12
public static final int getAnchorResourceLimit()

Limit for the number of anchors that can be created.

getAnchorsCreatedCount

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

The current number of anchors created.

getPersistenceState

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

the PersistenceState for this anchor

getPose

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

the location of the anchor in the world coordinate space

getTrackingState

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

the current state of the pose of this anchor

getUuid

Added in 1.0.0-alpha12
public UUID getUuid()

the UUID that identifies this Anchor if it is persisted

isAttached

Added in 1.0.0-alpha12
public final boolean isAttached()

whether the anchor is attached to an AnchorHolder

isTrackingAvailable

Added in 1.0.0-alpha12
public final boolean isTrackingAvailable()

a flag to represent available tracking state of the camera when creating the anchor

persist

Added in 1.0.0-alpha12
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-alpha12
public static final void setAnchorsCreatedCount(int value)

The current number of anchors created.

setPersistenceState

Added in 1.0.0-alpha12
public void setPersistenceState(@NonNull Anchor.PersistenceState value)

the PersistenceState for this anchor

setPose

Added in 1.0.0-alpha12
public void setPose(@NonNull Pose value)

the location of the anchor in the world coordinate space

setTrackingState

Added in 1.0.0-alpha12
public void setTrackingState(@NonNull TrackingState value)

the current state of the pose of this anchor

setUuid

Added in 1.0.0-alpha12
public void setUuid(UUID value)

the UUID that identifies this Anchor if it is persisted