public final class OpenXrPlane


Wraps the native XrTrackableANDROID with the Plane interface.

Summary

Public methods

@NonNull Anchor

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

@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
update(long xrTime)

Updates the entity retrieving its state at xrTime.

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.

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.

update

Added in 1.0.0-alpha01
public void update(long xrTime)

Updates the entity retrieving its state at xrTime.

Parameters
long xrTime

the number of nanoseconds since the start of the OpenXR epoch.