FakeRuntimeAugmentedObject
public final class FakeRuntimeAugmentedObject
Fake implementation of androidx.xr.arcore.runtime.AugmentedObject for testing purposes.
Summary
Public constructors |
|---|
FakeRuntimeAugmentedObject( |
Public methods |
|
|---|---|
@NonNull Anchor |
createAnchor(@NonNull Pose pose)Creates an Anchor that is attached to this trackable, using the given initial |
void |
detachAnchor(@NonNull Anchor anchor)Detaches the given |
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 |
setCategory(@NonNull AugmentedObjectCategory category)The category of the augmented object. |
void |
setCenterPose(@NonNull Pose centerPose)The pose of the center of the augmented object. |
void |
setExtents(@NonNull FloatSize3d extents)The extents of the augmented object. |
void |
setTrackingState(@NonNull TrackingState trackingState)The tracking state of the augmented object. |
Public constructors
FakeRuntimeAugmentedObject
public FakeRuntimeAugmentedObject(
@NonNull Pose centerPose,
@NonNull FloatSize3d extents,
@NonNull AugmentedObjectCategory category,
@NonNull TrackingState trackingState,
@NonNull Collection<@NonNull Anchor> anchors
)
Public methods
createAnchor
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
public void detachAnchor(@NonNull Anchor anchor)
Detaches the given androidx.xr.arcore.runtime.Anchor from this trackable. Single androidx.xr.arcore.runtime.Anchor instances rely on this function to remove themselves from the AnchorHolder.
getAnchors
public final @NonNull Collection<@NonNull Anchor> getAnchors()
The anchors attached to this object.
getCategory
public @NonNull AugmentedObjectCategory getCategory()
The category of the augmented object.
getCenterPose
public @NonNull Pose getCenterPose()
The pose of the center of the augmented object.
getExtents
public @NonNull FloatSize3d getExtents()
The extents of the augmented object.
getTrackingState
public @NonNull TrackingState getTrackingState()
The tracking state of the augmented object.
setCategory
public void setCategory(@NonNull AugmentedObjectCategory category)
The category of the augmented object.
setCenterPose
public void setCenterPose(@NonNull Pose centerPose)
The pose of the center of the augmented object.
setExtents
public void setExtents(@NonNull FloatSize3d extents)
The extents of the augmented object.
setTrackingState
public void setTrackingState(@NonNull TrackingState trackingState)
The tracking state of the augmented object.