3D Plane, represented by its equation
Definition at line 1326 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) | |
Gets a plane which contains these three points. More... | |
TPlane (const TPoint3D &p1, const TLine3D &r2) | |
Gets a plane which contains this point and this line. More... | |
TPlane (const TLine3D &r1, const TLine3D &r2) | |
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: . More... | |
Gets a plane which contains these three points.
std::logic_error | if the points are linearly dependants. |
Definition at line 785 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::getEpsilon(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Gets a plane which contains this point and this line.
std::logic_error | if the point is inside the line. |
Definition at line 801 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::TLine3D::director, mrpt::math::getEpsilon(), mrpt::math::TLine3D::pBase, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Gets a plane which contains the two lines.
std::logic_error | if the lines do not cross. |
Definition at line 814 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::TLine3D::contains(), mrpt::math::crossProduct3D(), mrpt::math::TLine3D::director, evaluatePoint(), mrpt::math::getEpsilon(), mrpt::math::TLine3D::pBase, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
inline |
Fast default constructor.
Initializes to garbage.
Definition at line 1425 of file lightweight_geom_data.h.
|
inline |
Constructor from plane coefficients.
Definition at line 1429 of file lightweight_geom_data.h.
References coefs.
|
inline |
Constructor from an array of coefficients.
Definition at line 1439 of file lightweight_geom_data.h.
References coefs.
bool mrpt::math::TPlane::contains | ( | const TPoint3D & | point | ) | const |
Check whether a point is contained into the plane.
Definition at line 725 of file lightweight_geom_data.cpp.
References distance(), and mrpt::math::getEpsilon().
Referenced by contains(), getAsPose3DForcingOrigin(), and mrpt::math::intersect().
|
inline |
Check whether a segment is fully contained into the plane.
Definition at line 1344 of file lightweight_geom_data.h.
References contains(), mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.
bool mrpt::math::TPlane::contains | ( | const TLine3D & | line | ) | const |
Check whether a line is fully contained into the plane.
Definition at line 729 of file lightweight_geom_data.cpp.
References contains(), mrpt::math::getAngle(), mrpt::math::getEpsilon(), and mrpt::math::TLine3D::pBase.
double mrpt::math::TPlane::distance | ( | const TPoint3D & | point | ) | const |
Distance to 3D point.
Definition at line 735 of file lightweight_geom_data.cpp.
References coefs, and evaluatePoint().
Referenced by contains(), mrpt::math::distance(), distance(), and mrpt::math::ransac3Dplane_distance().
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.
Definition at line 739 of file lightweight_geom_data.cpp.
References distance(), mrpt::math::getAngle(), mrpt::math::getEpsilon(), and mrpt::math::TLine3D::pBase.
double mrpt::math::TPlane::evaluatePoint | ( | const TPoint3D & | point | ) | const |
Evaluate a point in the plane's equation.
Definition at line 721 of file lightweight_geom_data.cpp.
References coefs.
Referenced by mrpt::opengl::CPolyhedron::augment(), distance(), mrpt::math::intersect(), mrpt::math::project3D(), and TPlane().
void mrpt::math::TPlane::getAsPose3D | ( | mrpt::poses::CPose3D & | outPose | ) |
Gets a pose whose XY plane corresponds to this plane.
Definition at line 759 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::generateAxisBaseFromDirectionAndAxis(), mrpt::math::getEpsilon(), and getUnitaryNormalVector().
Referenced by mrpt::math::TPolygon3D::contains(), getAsPose3D(), intersectInCommonPlane(), mrpt::math::project3D(), and mrpt::math::TPolygonWithPlane::TPolygonWithPlane().
|
inline |
Gets a pose whose XY plane corresponds to this plane.
Definition at line 1384 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. |
Definition at line 773 of file lightweight_geom_data.cpp.
References contains(), mrpt::math::generateAxisBaseFromDirectionAndAxis(), and getUnitaryNormalVector().
Referenced by mrpt::math::TPolygon3D::distance(), and 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 1401 of file lightweight_geom_data.h.
References getAsPose3DForcingOrigin().
void mrpt::math::TPlane::getNormalVector | ( | double(&) | vec[3] | ) | const |
Get plane's normal vector.
Definition at line 746 of file lightweight_geom_data.cpp.
References coefs.
Referenced by getUnitaryNormalVector(), and mrpt::opengl::CPolyhedron::setNormal().
|
inline |
Unitarize, then get normal vector.
Definition at line 1372 of file lightweight_geom_data.h.
References getNormalVector(), and unitarize().
Referenced by getAsPose3D(), and getAsPose3DForcingOrigin().
void mrpt::math::TPlane::unitarize | ( | ) |
Unitarize normal vector.
Definition at line 752 of file lightweight_geom_data.cpp.
References coefs.
Referenced by mrpt::opengl::CPolyhedron::augment(), mrpt::math::getSegmentBisector(), getUnitaryNormalVector(), and mrpt::math::project3D().
double mrpt::math::TPlane::coefs[4] |
Plane coefficients, stored as an array: .
Definition at line 1332 of file lightweight_geom_data.h.
Referenced by mrpt::opengl::CPolyhedron::augment(), createPlaneFromPoseAndAxis(), mrpt::math::createPlaneFromPoseAndNormal(), mrpt::math::distance(), distance(), evaluatePoint(), mrpt::math::getAngle(), getAsPose3D(), mrpt::opengl::CPolyhedron::getDual(), getNormalVector(), mrpt::math::getRegressionPlane(), mrpt::math::getSegmentBisector(), mrpt::math::intersect(), mrpt::math::project3D(), mrpt::math::ransac3Dplane_distance(), mrpt::math::ransac3Dplane_fit(), TPlane(), and unitarize().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |