FakeRuntimePlane


public final class FakeRuntimePlane implements AnchorHolder


Test-only implementation of Plane

Summary

Public constructors

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

final @NonNull Collection<@NonNull Anchor>
@NonNull Pose

The center of the detected plane.

@NonNull Vector2

The dimensions of the detected plane.

@NonNull Plane.Label
Plane

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

@NonNull TrackingState

The TrackingState of this trackable.

@NonNull Plane.Type

The Type of the plane

@NonNull List<@NonNull Vector2>

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

void

Notifies the AnchorHolder that the given Anchor has been persisted.

void
setCenterPose(@NonNull Pose centerPose)

The center of the detected plane.

void

The dimensions of the detected plane.

void
setSubsumedBy(Plane subsumedBy)

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

void

The TrackingState of this trackable.

void

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

Public constructors

FakeRuntimePlane

Added in 1.0.0-alpha01
public FakeRuntimePlane(
    @NonNull Plane.Type type,
    @NonNull Plane.Label label,
    @NonNull TrackingState trackingState,
    @NonNull Pose centerPose,
    @NonNull Vector2 extents,
    @NonNull List<@NonNull Vector2> vertices,
    Plane subsumedBy,
    @NonNull Collection<@NonNull Anchor> anchors
)

Public methods

createAnchor

Added in 1.0.0-alpha01
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-alpha01
public void detachAnchor(@NonNull Anchor anchor)

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

getAnchors

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

getCenterPose

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

The center of the detected plane.

getExtents

Added in 1.0.0-alpha01
public @NonNull Vector2 getExtents()

The dimensions of the detected plane.

getLabel

Added in 1.0.0-alpha01
public @NonNull Plane.Label getLabel()

getSubsumedBy

Added in 1.0.0-alpha01
public Plane getSubsumedBy()

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

getTrackingState

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

The TrackingState of this trackable.

getType

Added in 1.0.0-alpha01
public @NonNull Plane.Type getType()

The Type of the plane

getVertices

Added in 1.0.0-alpha01
public @NonNull List<@NonNull Vector2getVertices()

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

persistAnchor

Added in 1.0.0-alpha01
public void persistAnchor(@NonNull Anchor anchor)

Notifies the AnchorHolder that the given Anchor has been persisted.

setCenterPose

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

The center of the detected plane.

setExtents

Added in 1.0.0-alpha01
public void setExtents(@NonNull Vector2 extents)

The dimensions of the detected plane.

setSubsumedBy

Added in 1.0.0-alpha01
public void setSubsumedBy(Plane subsumedBy)

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

setTrackingState

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

The TrackingState of this trackable.

setVertices

Added in 1.0.0-alpha01
public void setVertices(@NonNull List<@NonNull Vector2> vertices)

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