Class representing a plane defined by a point and a normal, or a plane equation. More...
Functions | |
Plane () | |
Default constructor. More... | |
~Plane () | |
Default destructor. More... | |
void | clear () |
Clears all the data. More... | |
sl::float3 | getNormal () |
Gets the plane normal vector. More... | |
sl::float3 | getCenter () |
Gets the plane center point. More... | |
Transform | getPose () |
Gets the plane pose relative to the global reference frame. More... | |
sl::float2 | getExtents () |
Gets the width and height of the bounding rectangle around the plane contours. More... | |
sl::float4 | getPlaneEquation () |
Gets the plane equation. More... | |
std::vector< sl::float3 > | getBounds () |
Gets 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)) |
Gets the distance between the input point and the projected point alongside the normal vector onto the plane (the closest point on the plane). More... | |
Attributes | |
PLANE_TYPE | type = PLANE_TYPE::UNKNOWN |
Type of the plane defined by its orientation. More... | |
Class representing 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, etc.
Plane | ( | ) |
Default constructor.
~Plane | ( | ) |
Default destructor.
void clear | ( | ) |
Clears all the data.
sl::float3 getNormal | ( | ) |
Gets the plane normal vector.
sl::float3 getCenter | ( | ) |
Gets the plane center point.
Transform getPose | ( | ) |
Gets the plane pose relative to the global reference frame.
(0, 0, 0)
to the plane center. sl::float2 getExtents | ( | ) |
Gets the width and height of the bounding rectangle around the plane contours.
sl::float4 getPlaneEquation | ( | ) |
Gets the plane equation.
{a, b, c, d}
. ax + by + cz = d
. std::vector<sl::float3> getBounds | ( | ) |
Gets the polygon bounds of the plane.
sl::Mesh extractMesh | ( | ) |
Compute and return the mesh of the bounds polygon.
float getClosestDistance | ( | sl::float3 | point = sl::float3(0, 0, 0) | ) |
Gets the distance between the input point and the projected point alongside the normal vector onto the plane (the closest point on the plane).
point | : Point to project into the plane. |
PLANE_TYPE type = PLANE_TYPE::UNKNOWN |
Type of the plane defined by its orientation.