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

Functions

 Plane ()
 
 ~Plane ()
 
void clear ()
 Clears all the data. More...
 
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 RuntimeParameters::measure3D_reference_frame

Constructor and Destructor

◆ Plane()

Plane ( )

◆ ~Plane()

~Plane ( )

Functions

◆ clear()

void clear ( )

Clears all the data.

◆ getNormal()

sl::float3 getNormal ( )

Get the plane normal vector.

Returns
Plane normal vector, with normalized components

◆ getCenter()

sl::float3 getCenter ( )

Get the plane center point.

Returns
Plane center point

◆ getPose()

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

◆ getExtents()

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

◆ getPlaneEquation()

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)

◆ getBounds()

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

◆ extractMesh()

sl::Mesh extractMesh ( )

Compute and return the mesh of the bounds polygon.

Returns
A mesh representing the plane delimited by the visible bounds

◆ getClosestDistance()

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

◆ type

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.