FakeRuntimeAugmentedObject


class FakeRuntimeAugmentedObject


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

Summary

Public constructors

FakeRuntimeAugmentedObject(
    centerPose: Pose,
    extents: FloatSize3d,
    category: AugmentedObjectCategory,
    trackingState: TrackingState,
    anchors: MutableCollection<Anchor>
)

Public functions

open Anchor

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

open Unit

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

Public properties

MutableCollection<Anchor>

The anchors attached to this object.

open AugmentedObjectCategory

The category of the augmented object.

open Pose

The pose of the center of the augmented object.

open FloatSize3d

The extents of the augmented object.

open TrackingState

The tracking state of the augmented object.

Public constructors

FakeRuntimeAugmentedObject

Added in 1.0.0-alpha06
FakeRuntimeAugmentedObject(
    centerPose: Pose = Pose(),
    extents: FloatSize3d = FloatSize3d(),
    category: AugmentedObjectCategory = AugmentedObjectCategory.KEYBOARD,
    trackingState: TrackingState = TrackingState.TRACKING,
    anchors: MutableCollection<Anchor> = mutableListOf()
)

Public functions

createAnchor

Added in 1.0.0-alpha06
open fun createAnchor(pose: Pose): Anchor

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
open fun detachAnchor(anchor: Anchor): Unit

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.

Public properties

anchors

Added in 1.0.0-alpha06
val anchorsMutableCollection<Anchor>

The anchors attached to this object.

category

Added in 1.0.0-alpha06
open var categoryAugmentedObjectCategory

The category of the augmented object.

centerPose

Added in 1.0.0-alpha06
open var centerPosePose

The pose of the center of the augmented object.

extents

Added in 1.0.0-alpha06
open var extentsFloatSize3d

The extents of the augmented object.

trackingState

Added in 1.0.0-alpha06
open var trackingStateTrackingState

The tracking state of the augmented object.