FakeRuntimeAugmentedImage


public final class FakeRuntimeAugmentedImage


Test-only implementation of RuntimeImage

The properties of the FakeRuntimeAugmentedImage can be set manually in order to simulate a runtime image in the environment.

For example, for a FakeRuntimeAugmentedImage with TrackingState.PAUSED:

val image = FakeRuntimeImage(trackingState = TrackingState.PAUSED)

And to modify the properties during the test:

augmentedImage.apply {
trackingState = TrackingState.TRACKING
centerPose = Pose(Vector3(1f, 2f, 3f), Quaternion(0f, 0f, 0f, 1f))
}

Summary

Public constructors

FakeRuntimeAugmentedImage(
    @NonNull TrackingState trackingState,
    @NonNull Pose centerPose,
    @NonNull FloatSize2d extents,
    int index,
    @NonNull Collection<@NonNull Anchor> anchors
)

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

Public methods

final @NonNull Collection<@NonNull Anchor>

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

@NonNull Pose

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

@NonNull FloatSize2d

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

int

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

@NonNull TrackingState

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

void

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

void

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

void
setIndex(int value)

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

void

This method is deprecated. arcore-testing fakes have been moved internal and should no longer be used by unit tests.

Public constructors

FakeRuntimeAugmentedImage

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public FakeRuntimeAugmentedImage(
    @NonNull TrackingState trackingState,
    @NonNull Pose centerPose,
    @NonNull FloatSize2d extents,
    int index,
    @NonNull Collection<@NonNull Anchor> anchors
)

Public methods

getAnchors

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public final @NonNull Collection<@NonNull AnchorgetAnchors()

The anchors that are attached to this image.

getCenterPose

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public @NonNull Pose getCenterPose()

The center of the detected image.

getExtents

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public @NonNull FloatSize2d getExtents()

The dimensions of the detected image.

getIndex

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public int getIndex()

The zero-based positional index of the detected image from its originating image database.

getTrackingState

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public @NonNull TrackingState getTrackingState()

The TrackingState of this trackable

setCenterPose

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public void setCenterPose(@NonNull Pose value)

The center of the detected image.

setExtents

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public void setExtents(@NonNull FloatSize2d value)

The dimensions of the detected image.

setIndex

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
public void setIndex(int value)

The zero-based positional index of the detected image from its originating image database.

setTrackingState

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

The TrackingState of this trackable