Class 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 Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionARPlane(String id, ARPlane.Type type, ARPose centerPose, float extentX, float extentZ, float[] polygon, ARTrackingState trackingState) Creates a plane snapshot. -
Method Summary
Modifier and TypeMethodDescriptionThe pose of the plane center in world space.floatThe surface extent along the plane's local X axis in meters.floatThe surface extent along the plane's local Z axis in meters.getId()The stable identifier shared by all snapshots of this physical plane.float[]The boundary polygon as a newly allocated array ofx, zpairs in the plane's local frame, or null when the platform supplies none.The tracking quality of this plane.getType()The surface orientation.
-
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 asx, zpairs in the plane's local frame, or null when the platform supplies none -
trackingState: the tracking quality of this plane
-
-
-
Method Details
-
getId
The stable identifier shared by all snapshots of this physical plane. -
getType
The surface orientation. -
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 ofx, zpairs in the plane's local frame, or null when the platform supplies none. -
getTrackingState
The tracking quality of this plane.
-