FakeRuntimeAugmentedObject


public final class FakeRuntimeAugmentedObject


Fake implementation of androidx.xr.arcore.internal.AugmentedObject for testing purposes.

Summary

Public constructors

FakeRuntimeAugmentedObject(
    @NonNull Pose centerPose,
    @NonNull FloatSize3d extents,
    @NonNull AugmentedObjectCategory category,
    @NonNull TrackingState trackingState,
    @NonNull Collection<@NonNull Anchor> anchors
)

Public methods

@NonNull Anchor

Creates an Anchor that is attached to this trackable, using the given initial pose in the world coordinate space.

void

Detaches the given androidx.xr.arcore.internal.Anchor from this trackable.

final @NonNull Collection<@NonNull Anchor>

The anchors attached to this object.

@NonNull AugmentedObjectCategory

The category of the augmented object.

@NonNull Pose

The pose of the center of the augmented object.

@NonNull FloatSize3d

The extents of the augmented object.

@NonNull TrackingState

The tracking state of the augmented object.

void

The category of the augmented object.

void
setCenterPose(@NonNull Pose centerPose)

The pose of the center of the augmented object.

void

The extents of the augmented object.

void

The tracking state of the augmented object.

Public constructors

FakeRuntimeAugmentedObject

Added in 1.0.0-alpha06
public FakeRuntimeAugmentedObject(
    @NonNull Pose centerPose,
    @NonNull FloatSize3d extents,
    @NonNull AugmentedObjectCategory category,
    @NonNull TrackingState trackingState,
    @NonNull Collection<@NonNull Anchor> anchors
)

Public methods

createAnchor

Added in 1.0.0-alpha06
public @NonNull Anchor createAnchor(@NonNull Pose pose)

Creates an Anchor that is attached to this trackable, using the given initial pose in the world coordinate space.

detachAnchor

Added in 1.0.0-alpha06
public void detachAnchor(@NonNull Anchor anchor)

Detaches the given androidx.xr.arcore.internal.Anchor from this trackable. Single androidx.xr.arcore.internal.Anchor instances rely on this function to remove themselves from the AnchorHolder.

getAnchors

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

The anchors attached to this object.

getCategory

Added in 1.0.0-alpha06
public @NonNull AugmentedObjectCategory getCategory()

The category of the augmented object.

getCenterPose

Added in 1.0.0-alpha06
public @NonNull Pose getCenterPose()

The pose of the center of the augmented object.

getExtents

Added in 1.0.0-alpha06
public @NonNull FloatSize3d getExtents()

The extents of the augmented object.

getTrackingState

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

The tracking state of the augmented object.

setCategory

Added in 1.0.0-alpha06
public void setCategory(@NonNull AugmentedObjectCategory category)

The category of the augmented object.

setCenterPose

Added in 1.0.0-alpha06
public void setCenterPose(@NonNull Pose centerPose)

The pose of the center of the augmented object.

setExtents

Added in 1.0.0-alpha06
public void setExtents(@NonNull FloatSize3d extents)

The extents of the augmented object.

setTrackingState

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

The tracking state of the augmented object.