C++ Python C# C
Plane Class Reference

A plane defined by a point and a normal, or a plane equation. More...

## Functions

def type (self)
The plane type defines the plane orientation : vertical or horizontal. More...

def get_normal (self)
Gets the plane normal vector. More...

def get_center (self)
Gets the plane center point. More...

def get_pose (self, py_pose=Transform())
Gets the plane pose relative to the global reference frame. More...

def get_extents (self)
Gets the width and height of the bounding rectangle around the plane contours. More...

def get_plane_equation (self)
Gets the plane equation. More...

def get_bounds (self)
Gets the polygon bounds of the plane. More...

def extract_mesh (self)
Computes and returns the mesh of the bounds polygon. More...

def get_closest_distance (self, point=[0, 0, 0])
Gets the distance between the input point and the projected point alongside the normal vector onto the plane. More...

def clear (self)
Clears all the data.

## Detailed Description

A plane defined by a point and a normal, or a plane equation.

Other elements can be extracted such as the mesh, the 3D bounds...

Note
The plane measurements are expressed in REFERENCE_FRAME defined by RuntimeParameters.measure3D_reference_frame .

## ◆ type()

 def type ( self )

The plane type defines the plane orientation : vertical or horizontal.

Warning
It is deduced from the gravity vector and is therefore only available with the ZED-M. The ZED will give UNKNOWN for every plane.

## ◆ get_normal()

 def get_normal ( self )

Gets the plane normal vector.

Returns
Plane normal vector, with normalized components (numpy array)

## ◆ get_center()

 def get_center ( self )

Gets the plane center point.

Returns
Plane center point (numpy array)

## ◆ get_pose()

 def get_pose ( self, py_pose = `Transform()` )

Gets the plane pose relative to the global reference frame.

Parameters
 py_pose : a Transform or it creates one by default.
Returns
A transformation matrix (rotation and translation) which gives the plane pose. Can be used to transform the global reference frame center (0,0,0) to the plane center.

## ◆ get_extents()

 def get_extents ( self )

Gets the width and height of the bounding rectangle around the plane contours.

Returns
Width and height of the bounding plane contours (numpy array)
Warning
This value is expressed in the plane reference frame.

## ◆ get_plane_equation()

 def get_plane_equation ( self )

Gets the plane equation.

Returns
Plane equation, in the form : ax+by+cz=d, the returned values are (a,b,c,d) (numpy array)

## ◆ get_bounds()

 def get_bounds ( self )

Gets the polygon bounds of the plane.

Returns
Vector of 3D points forming a polygon corresponding to the current visible limits of the plane (numpy array)

## ◆ extract_mesh()

 def extract_mesh ( self )

Computes and returns the mesh of the bounds polygon.

Returns
A mesh representing the plane delimited by the visible bounds

## ◆ get_closest_distance()

 def get_closest_distance ( self, point = `[0,0,0]` )

Gets the distance between the input point and the projected point alongside the normal vector onto the plane.

This corresponds to the closest point on the plane.

Parameters
 point : The 3D point to project into the plane. Default: [0,0,0]
Returns
The Euclidian distance between the input point and the projected point