FakeRuntimeAugmentedImage


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(
    trackingState: TrackingState,
    centerPose: Pose,
    extents: FloatSize2d,
    index: Int,
    anchors: MutableCollection<Anchor>
)

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

Public properties

MutableCollection<Anchor>

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

open Pose

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

open FloatSize2d

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

open Int

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

open TrackingState

This property 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
FakeRuntimeAugmentedImage(
    trackingState: TrackingState = TrackingState.TRACKING,
    centerPose: Pose = Pose(),
    extents: FloatSize2d = FloatSize2d(),
    index: Int = 0,
    anchors: MutableCollection<Anchor> = mutableListOf()
)

Public properties

anchors

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
val anchorsMutableCollection<Anchor>

The anchors that are attached to this image.

centerPose

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
open var centerPosePose

The center of the detected image.

extents

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
open var extentsFloatSize2d

The dimensions of the detected image.

index

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
open var indexInt

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

trackingState

Added in 1.0.0-alpha14
Deprecated in 1.0.0-alpha14
open var trackingStateTrackingState

The TrackingState of this trackable