FakeRuntimePlane


class FakeRuntimePlane : AnchorHolder


Test-only implementation of Plane

Summary

Public constructors

FakeRuntimePlane(
    type: Plane.Type,
    label: Plane.Label,
    trackingState: TrackingState,
    centerPose: Pose,
    extents: Vector2,
    vertices: List<Vector2>,
    subsumedBy: Plane?,
    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 Anchor from this trackable.

open Unit

Notifies the AnchorHolder that the given Anchor has been persisted.

Public properties

MutableCollection<Anchor>
open Pose

The center of the detected plane.

open Vector2

The dimensions of the detected plane.

open Plane.Label
open Plane?

If this plane has been subsumed, returns the plane this plane was merged into.

open TrackingState

The TrackingState of this trackable.

open Plane.Type

The Type of the plane

open List<Vector2>

Returns the 2D vertices (three or more) of a convex polygon approximating the detected plane.

Public constructors

FakeRuntimePlane

Added in 1.0.0-alpha01
FakeRuntimePlane(
    type: Plane.Type = RuntimePlane.Type.HorizontalUpwardFacing,
    label: Plane.Label = RuntimePlane.Label.Floor,
    trackingState: TrackingState = TrackingState.Tracking,
    centerPose: Pose = Pose(),
    extents: Vector2 = Vector2.Zero,
    vertices: List<Vector2> = emptyList(),
    subsumedBy: Plane? = null,
    anchors: MutableCollection<Anchor> = mutableListOf()
)

Public functions

createAnchor

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

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

persistAnchor

Added in 1.0.0-alpha01
open fun persistAnchor(anchor: Anchor): Unit

Notifies the AnchorHolder that the given Anchor has been persisted.

Public properties

anchors

Added in 1.0.0-alpha01
val anchorsMutableCollection<Anchor>

centerPose

Added in 1.0.0-alpha01
open var centerPosePose

The center of the detected plane.

extents

Added in 1.0.0-alpha01
open var extentsVector2

The dimensions of the detected plane.

label

Added in 1.0.0-alpha01
open val labelPlane.Label

subsumedBy

Added in 1.0.0-alpha01
open var subsumedByPlane?

If this plane has been subsumed, returns the plane this plane was merged into.

trackingState

Added in 1.0.0-alpha01
open var trackingStateTrackingState

The TrackingState of this trackable.

type

Added in 1.0.0-alpha01
open val typePlane.Type

The Type of the plane

vertices

Added in 1.0.0-alpha01
open var verticesList<Vector2>

Returns the 2D vertices (three or more) of a convex polygon approximating the detected plane.