Plane Class Reference

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... More...

General Functions

 Plane ()
 
 ~Plane ()
 
sl::float3 getNormal ()
 Get the plane normal vector. More...
 
sl::float3 getCenter ()
 Get the plane center point. More...
 
Transform getPose ()
 Get the plane pose relative to the global reference frame. More...
 
sl::float2 getExtents ()
 Get the width and height of the bounding rectangle around the plane contours. More...
 
sl::float4 getPlaneEquation ()
 Get the plane equation. More...
 
std::vector< sl::float3getBounds ()
 Get the polygon bounds of the plane. More...
 
sl::Mesh extractMesh ()
 Compute and return the mesh of the bounds polygon. More...
 
float getClosestDistance (sl::float3 point=sl::float3(0, 0, 0))
 Get 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. More...
 

Attributes

PLANE_TYPE type = PLANE_TYPE_UNKNOWN
 

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 measurement are expressed in REFERENCE_FRAME defined by the RuntimeParameters measure3D_reference_frame

Constructor and Destructor

Plane ( )
~Plane ( )

Functions

sl::float3 getNormal ( )

Get the plane normal vector.

Returns
Plane normal vector, with normalized components
sl::float3 getCenter ( )

Get the plane center point.

Returns
Plane center point
Transform getPose ( )

Get the plane pose relative to the global reference frame.

Returns
A transformation matrix (rotation and translation) which give the plane pose. Can be used to transform the global reference frame center (0,0,0) to the plane center
sl::float2 getExtents ( )

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

Returns
Width and height of the bounding plane contours
Warning
This value is expressed in the plane reference frame
sl::float4 getPlaneEquation ( )

Get the plane equation.

Returns
Plane equation, in the form : ax+by+cz=d, the returned values are (a,b,c,d)
std::vector<sl::float3> getBounds ( )

Get the polygon bounds of the plane.

Returns
Vector of 3D points forming a polygon bounds corresponding to the current visible limits of the plane
sl::Mesh extractMesh ( )

Compute and return the mesh of the bounds polygon.

Returns
A mesh representing the plane delimited by the visible bounds
float getClosestDistance ( sl::float3  point = sl::float3(0, 0, 0))

Get 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
Thepoint to project into the plane
Returns
The Euclidean distance between the input point and the projected point

Variables

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

Note
It is deduced from the gravity vector and is therefore only available with the ZED-M. The ZED will give PLANE_TYPE_UNKNOWN for every planes.