Plane

public class Plane

Describes the current best knowledge of a real-world planar surface.

Merging / Subsumption

Two or more planes may be automatically merged into a single parent plane, resulting in each child plane's getSubsumedBy() returning the parent plane. A subsumed plane becomes identical to the parent plane, and will continue behaving as if it were independently tracked, for example being included in the output of Frame.getUpdatedTrackables(Class).

Planes are hashable and may for example be used as keys in HashMaps. Subsumed planes are distinct from their parents and siblings.

Change from Developer Preview 1: Two Plane objects may refer to the same logical plane detected by the system. Be sure to always use equals(Object) when comparing them.

Nested Classes

enum Plane.Type Simple summary of the normal vector of a plane, for filtering purposes. 

Public Methods

Anchor
createAnchor(Pose pose)
Creates an anchor that is attached to this trackable, using the given initial pose in the world coordinate space.
boolean
equals(Object obj)
Indicates whether some other object is a Trackable referencing the same logical trackable as this one.
Collection<Anchor>
getAnchors()
Gets the Anchors attached to this trackable.
Pose
getCenterPose()
Returns the pose of the center of the detected plane.
float
getExtentX()
Returns the length of this plane's bounding rectangle measured along the local X-axis of the coordinate space centered on the plane.
float
getExtentZ()
Returns the length of this plane's bounding rectangle measured along the local Z-axis of the coordinate frame centered on the plane.
FloatBuffer
getPolygon()
Returns the 2D vertices of a convex polygon approximating the detected plane, in the form [x1, z1, x2, z2, ...].
Plane
getSubsumedBy()
If this plane has been subsumed, returns the plane this plane was merged into.
TrackingState
getTrackingState()
Gets this trackable's TrackingState.
Plane.Type
getType()
Returns the type of this plane.
int
hashCode()
Returns a hash code value for the object.
boolean
isPoseInExtents(Pose pose)
Returns true if the given pose (usually obtained from a HitResult) is in the plane's rectangular extents.
boolean
isPoseInPolygon(Pose pose)
Returns true if the given pose (usually obtained from a HitResult) is in the plane's polygon.

Inherited Methods

Public Methods