# Class ARPlane

java.lang.Object
com.codename1.ar.ARPlane

public final class ARPlane extends Object

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 Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `ARPlane.Type`
  The orientation of a detected plane.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ARPlane(String id, ARPlane.Type type, ARPose centerPose, float extentX, float extentZ, float[] polygon, ARTrackingState trackingState)`
  Creates a plane snapshot.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ARPose`
  `getCenterPose()`
  The pose of the plane center in world space.
  `float`
  `getExtentX()`
  The surface extent along the plane's local X axis in meters.
  `float`
  `getExtentZ()`
  The surface extent along the plane's local Z axis in meters.
  `String`
  `getId()`
  The stable identifier shared by all snapshots of this physical plane.
  `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.
  `ARTrackingState`
  `getTrackingState()`
  The tracking quality of this plane.
  `ARPlane.Type`
  `getType()`
  The surface orientation.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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

    - `id`: the stable identifier shared by all snapshots of this plane

    - `type`: the surface orientation

    - `centerPose`: the pose of the plane center in world space; local X/Z span the surface, local Y is the normal

    - `extentX`: the surface extent along local X in meters

    - `extentZ`: the surface extent along local Z in meters

    - `polygon`: an optional boundary polygon as `x, z` pairs in the plane's local frame, or null when the platform supplies none

    - `trackingState`: 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.