3D Plane, represented by its equation
Definition at line 868 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Member Functions | |
double | evaluatePoint (const TPoint3D &point) const |
Evaluate a point in the plane's equation. More... | |
bool | contains (const TPoint3D &point) const |
Check whether a point is contained into the plane. More... | |
bool | contains (const TSegment3D &segment) const |
Check whether a segment is fully contained into the plane. More... | |
bool | contains (const TLine3D &line) const |
Check whether a line is fully contained into the plane. More... | |
double | distance (const TPoint3D &point) const |
Distance to 3D point. More... | |
double | distance (const TLine3D &line) const |
Distance to 3D line. More... | |
void | getNormalVector (double(&vec)[3]) const |
Get plane's normal vector. More... | |
void | unitarize () |
Unitarize normal vector. More... | |
void | getUnitaryNormalVector (double(&vec)[3]) |
Unitarize, then get normal vector. More... | |
void | getAsPose3D (mrpt::poses::CPose3D &outPose) |
Gets a pose whose XY plane corresponds to this plane. More... | |
void | getAsPose3D (mrpt::poses::CPose3D &outPose) const |
Gets a pose whose XY plane corresponds to this plane. More... | |
void | getAsPose3DForcingOrigin (const TPoint3D &newOrigin, mrpt::poses::CPose3D &pose) |
Gets a pose whose XY plane corresponds to this, forcing an exact point as its spatial coordinates. More... | |
void | getAsPose3DForcingOrigin (const TPoint3D &newOrigin, mrpt::poses::CPose3D &pose) const |
Gets a pose whose XY plane corresponds to this, forcing an exact point as its spatial coordinates. More... | |
TPlane (const TPoint3D &p1, const TPoint3D &p2, const TPoint3D &p3) throw (std::logic_error) | |
Gets a plane which contains these three points. More... | |
TPlane (const TPoint3D &p1, const TLine3D &r2) throw (std::logic_error) | |
Gets a plane which contains this point and this line. More... | |
TPlane (const TLine3D &r1, const TLine3D &r2) throw (std::logic_error) | |
Gets a plane which contains the two lines. More... | |
TPlane () | |
Fast default constructor. More... | |
TPlane (double A, double B, double C, double D) | |
Constructor from plane coefficients. More... | |
TPlane (const double(&vec)[4]) | |
Constructor from an array of coefficients. More... | |
Public Attributes | |
double | coefs [4] |
Plane coefficients, stored as an array: ![]() | |
mrpt::math::TPlane::TPlane | ( | const TPoint3D & | p1, |
const TPoint3D & | p2, | ||
const TPoint3D & | p3 | ||
) | |||
throw | ( | std::logic_error | |
) |
Gets a plane which contains these three points.
std::logic_error | if the points are linearly dependants. |
Gets a plane which contains this point and this line.
std::logic_error | if the point is inside the line. |
Gets a plane which contains the two lines.
std::logic_error | if the lines do not cross. |
|
inline |
Fast default constructor.
Initializes to garbage.
Definition at line 957 of file lightweight_geom_data.h.
|
inline |
Constructor from plane coefficients.
Definition at line 961 of file lightweight_geom_data.h.
|
inline |
Constructor from an array of coefficients.
Definition at line 970 of file lightweight_geom_data.h.
bool mrpt::math::TPlane::contains | ( | const TLine3D & | line | ) | const |
Check whether a line is fully contained into the plane.
bool mrpt::math::TPlane::contains | ( | const TPoint3D & | point | ) | const |
Check whether a point is contained into the plane.
|
inline |
Check whether a segment is fully contained into the plane.
Definition at line 885 of file lightweight_geom_data.h.
References mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.
double mrpt::math::TPlane::distance | ( | const TLine3D & | line | ) | const |
Distance to 3D line.
Will be zero if the line is not parallel to the plane.
double mrpt::math::TPlane::distance | ( | const TPoint3D & | point | ) | const |
Distance to 3D point.
double mrpt::math::TPlane::evaluatePoint | ( | const TPoint3D & | point | ) | const |
Evaluate a point in the plane's equation.
void mrpt::math::TPlane::getAsPose3D | ( | mrpt::poses::CPose3D & | outPose | ) |
Gets a pose whose XY plane corresponds to this plane.
Referenced by getAsPose3D(), and mrpt::math::project3D().
|
inline |
Gets a pose whose XY plane corresponds to this plane.
Definition at line 922 of file lightweight_geom_data.h.
References getAsPose3D().
void mrpt::math::TPlane::getAsPose3DForcingOrigin | ( | const TPoint3D & | newOrigin, |
mrpt::poses::CPose3D & | pose | ||
) |
Gets a pose whose XY plane corresponds to this, forcing an exact point as its spatial coordinates.
std::logic_error | if the point is not inside the plane. |
Referenced by getAsPose3DForcingOrigin().
|
inline |
Gets a pose whose XY plane corresponds to this, forcing an exact point as its spatial coordinates.
std::logic_error | if the point is not inside the plane. |
Definition at line 935 of file lightweight_geom_data.h.
References getAsPose3DForcingOrigin().
void mrpt::math::TPlane::getNormalVector | ( | double(&) | vec[3] | ) | const |
Get plane's normal vector.
|
inline |
Unitarize, then get normal vector.
Definition at line 911 of file lightweight_geom_data.h.
void mrpt::math::TPlane::unitarize | ( | ) |
Unitarize normal vector.
double mrpt::math::TPlane::coefs[4] |
Plane coefficients, stored as an array: .
Definition at line 873 of file lightweight_geom_data.h.
Page generated by Doxygen 1.9.4 for MRPT 1.4.0 SVN: at Sun Aug 14 11:28:23 UTC 2022 |