Main MRPT website > C++ reference for MRPT 1.5.6
List of all members | Public Member Functions | Public Attributes

Detailed Description

3D Plane, represented by its equation $Ax+By+Cz+D=0$

See Also
TSegment3D,TLine3D,TPolygon3D,TPoint3D

Definition at line 893 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: $\left[A,B,C,D\right]$. More...
 

Constructor & Destructor Documentation

mrpt::math::TPlane::TPlane ( const TPoint3D p1,
const TPoint3D p2,
const TPoint3D p3 
)

Gets a plane which contains these three points.

Exceptions
std::logic_errorif the points are linearly dependants.

Definition at line 571 of file lightweight_geom_data.cpp.

References coefs, mrpt::math::geometryEpsilon, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.

mrpt::math::TPlane::TPlane ( const TPoint3D p1,
const TLine3D r2 
)

Gets a plane which contains this point and this line.

Exceptions
std::logic_errorif the point is inside the line.

Definition at line 584 of file lightweight_geom_data.cpp.

References coefs, mrpt::math::TLine3D::director, mrpt::math::geometryEpsilon, mrpt::math::TLine3D::pBase, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.

mrpt::math::TPlane::TPlane ( const TLine3D r1,
const TLine3D r2 
)
mrpt::math::TPlane::TPlane ( )
inline

Fast default constructor.

Initializes to garbage.

Definition at line 982 of file lightweight_geom_data.h.

mrpt::math::TPlane::TPlane ( double  A,
double  B,
double  C,
double  D 
)
inline

Constructor from plane coefficients.

Definition at line 986 of file lightweight_geom_data.h.

mrpt::math::TPlane::TPlane ( const double(&)  vec[4])
inline

Constructor from an array of coefficients.

Definition at line 995 of file lightweight_geom_data.h.

Member Function Documentation

bool mrpt::math::TPlane::contains ( const TPoint3D point) const

Check whether a point is contained into the plane.

Definition at line 526 of file lightweight_geom_data.cpp.

References distance(), and mrpt::math::geometryEpsilon.

Referenced by contains(), getAsPose3DForcingOrigin(), and mrpt::math::intersect().

bool mrpt::math::TPlane::contains ( const TSegment3D segment) const
inline

Check whether a segment is fully contained into the plane.

Definition at line 910 of file lightweight_geom_data.h.

References 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 529 of file lightweight_geom_data.cpp.

References contains(), mrpt::math::geometryEpsilon, mrpt::math::getAngle(), and mrpt::math::TLine3D::pBase.

double mrpt::math::TPlane::distance ( const TPoint3D point) const

Distance to 3D point.

Definition at line 533 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 536 of file lightweight_geom_data.cpp.

References distance(), mrpt::math::geometryEpsilon, mrpt::math::getAngle(), 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 523 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)
void mrpt::math::TPlane::getAsPose3D ( mrpt::poses::CPose3D outPose) const
inline

Gets a pose whose XY plane corresponds to this plane.

Definition at line 947 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.

Exceptions
std::logic_errorif the point is not inside the plane.

Definition at line 562 of file lightweight_geom_data.cpp.

References contains(), mrpt::math::generateAxisBaseFromDirectionAndAxis(), and getUnitaryNormalVector().

Referenced by mrpt::math::TPolygon3D::distance(), getAsPose3DForcingOrigin(), mrpt::math::intersect(), and mrpt::math::splitInConvexComponents().

void mrpt::math::TPlane::getAsPose3DForcingOrigin ( const TPoint3D newOrigin,
mrpt::poses::CPose3D pose 
) const
inline

Gets a pose whose XY plane corresponds to this, forcing an exact point as its spatial coordinates.

Exceptions
std::logic_errorif the point is not inside the plane.

Definition at line 960 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 540 of file lightweight_geom_data.cpp.

References coefs.

Referenced by mrpt::opengl::CPolyhedron::setNormal().

void mrpt::math::TPlane::getUnitaryNormalVector ( double(&)  vec[3])
inline

Unitarize, then get normal vector.

Definition at line 936 of file lightweight_geom_data.h.

Referenced by getAsPose3D(), and getAsPose3DForcingOrigin().

void mrpt::math::TPlane::unitarize ( )

Unitarize normal vector.

Definition at line 545 of file lightweight_geom_data.cpp.

References coefs.

Referenced by mrpt::opengl::CPolyhedron::augment(), mrpt::math::getSegmentBisector(), and mrpt::math::project3D().

Member Data Documentation

double mrpt::math::TPlane::coefs[4]



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018