MRPT logo

mrpt::math::TPlane Struct Reference

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

#include <mrpt/math/lightweight_geom_data.h>

List of all members.

Public Member Functions

double evaluatePoint (const TPoint3D &point) const
 Evaluate a point in the plane's equation.
bool contains (const TPoint3D &point) const
 Check whether a point is contained into the plane.
bool contains (const TSegment3D &segment)
 Check whether a segment is fully contained into the plane.
bool contains (const TLine3D &line) const
 Check whether a line is fully contained into the plane.
double distance (const TPoint3D &point) const
 Distance to 3D point.
double distance (const TLine3D &line) const
 Distance to 3D line.
void getNormalVector (double(&vec)[3]) const
 Get plane's normal vector.
void unitarize ()
 Unitarize normal vector.
void getUnitaryNormalVector (double(&vec)[3])
 Unitarize, then get normal vector.
void getAsPose3D (mrpt::poses::CPose3D &outPose)
 Gets a pose whose XY plane corresponds to this plane.
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.
 TPlane (const TPoint3D &p1, const TPoint3D &p2, const TPoint3D &p3) throw (std::logic_error)
 Gets a plane which contains these three points.
 TPlane (const TPoint3D &p1, const TLine3D &r2) throw (std::logic_error)
 Gets a plane which contains this point and this line.
 TPlane (const TLine3D &r1, const TLine3D &r2) throw (std::logic_error)
 Gets a plane which contains the two lines.
 TPlane ()
 Fast default constructor.
 TPlane (double A, double B, double C, double D)
 Constructor from plane coefficients.
 TPlane (const double(&vec)[4])
 Constructor from an array of coefficients.

Public Attributes

double coefs [4]
 Plane coefficients, stored as an array: $\left[A,B,C,D\right]$.


Detailed Description

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

See also:
TSegment3D,TLine3D,TPolygon3D,TPoint3D

Definition at line 764 of file lightweight_geom_data.h.


Constructor & Destructor Documentation

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.

Exceptions:
std::logic_error if the points are linearly dependants.

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

Gets a plane which contains this point and this line.

Exceptions:
std::logic_error if the point is inside the line.

mrpt::math::TPlane::TPlane ( const TLine3D r1,
const TLine3D r2 
) throw (std::logic_error)

Gets a plane which contains the two lines.

Exceptions:
std::logic_error if the lines do not cross.

mrpt::math::TPlane::TPlane (  )  [inline]

Fast default constructor.

Initializes to garbage.

Definition at line 838 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 842 of file lightweight_geom_data.h.

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

Constructor from an array of coefficients.

Definition at line 851 of file lightweight_geom_data.h.


Member Function Documentation

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 TSegment3D segment  )  [inline]

Check whether a segment is fully contained into the plane.

Definition at line 781 of file lightweight_geom_data.h.

References mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.

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

Check whether a point is contained into the plane.

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.

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_error if the point is not inside the plane.

void mrpt::math::TPlane::getNormalVector ( double(&)  vec[3]  )  const

Get plane's normal vector.

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

Unitarize, then get normal vector.

Definition at line 807 of file lightweight_geom_data.h.

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

Unitarize normal vector.


Member Data Documentation

Plane coefficients, stored as an array: $\left[A,B,C,D\right]$.

Definition at line 769 of file lightweight_geom_data.h.

Referenced by mrpt::math::operator<<(), and mrpt::math::operator>>().




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:32:05 EDT 2009