public final class ARPlane
- Object
- ARPlane
A real-world surface detected by the AR session, such as a floor, table or
wall. Planes grow and merge as the session learns more about the
environment; each refinement is delivered as a new immutable ARPlane
instance carrying the same getId(), through the session’s
ARPlaneListener.
The plane’s local coordinate frame is centered at getCenterPose() with
the surface spanning the local X and Z axes and the normal along local Y.
Nested types
enum ARPlane.Type | The orientation of a detected plane. |
Constructors
public ARPlane(String id, ARPlane.Type type, ARPose centerPose, float extentX, float extentZ, float[] polygon, ARTrackingState trackingState) | Creates a plane snapshot. |
Methods
public String getId() | The stable identifier shared by all snapshots of this physical plane. |
public ARPlane.Type getType() | The surface orientation. |
public ARPose getCenterPose() | The pose of the plane center in world space. |
public float getExtentX() | The surface extent along the plane’s local X axis in meters. |
public float getExtentZ() | The surface extent along the plane’s local Z axis in meters. |
public float[] getPolygon() | The boundary polygon as a newly allocated array of x, z pairs in the plane’s local frame, or null when the platform supplies none. |
public ARTrackingState getTrackingState() | The tracking quality of this plane. |
Inherited methods
Constructor details
ARPlane
public ARPlane(String id, ARPlane.Type type, ARPose centerPose, float extentX, float extentZ, float[] polygon, ARTrackingState trackingState)Creates a plane snapshot. Intended for platform implementations and
tests; applications receive planes from the session.
Parameters
idString- the stable identifier shared by all snapshots of this plane
typeARPlane.Type- the surface orientation
centerPoseARPose- the pose of the plane center in world space; local X/Z span the surface, local Y is the normal
extentXfloat- the surface extent along local X in meters
extentZfloat- the surface extent along local Z in meters
polygonfloat[]- an optional boundary polygon as
x, zpairs in the plane’s local frame, or null when the platform supplies none trackingStateARTrackingState- the tracking quality of this plane
Method details
getId
public String getId()The stable identifier shared by all snapshots of this physical plane.
getType
public ARPlane.Type getType()The surface orientation.
getCenterPose
public ARPose getCenterPose()The pose of the plane center in world space. Local X/Z span the
surface, local Y is the surface normal.
getExtentX
public float getExtentX()The surface extent along the plane’s local X axis in meters.
getExtentZ
public float getExtentZ()The surface extent along the plane’s local Z axis in meters.
getPolygon
public float[] getPolygon()The boundary polygon as a newly allocated array of
x, z pairs in the
plane’s local frame, or null when the platform supplies none.getTrackingState
public ARTrackingState getTrackingState()The tracking quality of this plane.