MRPT logo

geometry.h File Reference

#include <mrpt/utils/utils_defs.h>
#include <mrpt/math/CMatrixTemplateNumeric.h>
#include <mrpt/poses.h>
#include <mrpt/math/lightweight_geom_data.h>
#include <mrpt/math/CSparseMatrixTemplate.h>
#include <mrpt/math/utils.h>

Go to the source code of this file.


Classes

class  mrpt::math::TPolygonWithPlane
 Slightly heavyweight type to speed-up calculations with polygons in 3D. More...

Namespaces

namespace  mrpt
 This is the global namespace for all Mobile Robot Porgramming Toolkit (MRPT) libraries.
namespace  mrpt::math
 This base provides a set of functions for maths stuff.

Functions

bool MRPTDLLIMPEXP mrpt::math::traceRay (const vector< TPolygonWithPlane > &vec, const mrpt::poses::CPose3D &pose, double &dist)
 Fast ray tracing method using polygons' properties.
bool mrpt::math::traceRay (const vector< TPolygon3D > &vec, const mrpt::poses::CPose3D &pose, double &dist)
 Fast ray tracing method using polygons' properties.
template<class T , class U , class V >
void mrpt::math::crossProduct3D (const T &v0, const U &v1, V &vOut)
 Computes the cross product of two 3D vectors, returning a vector normal to both.
template<class T >
void mrpt::math::crossProduct3D (const std::vector< T > &v0, const std::vector< T > &v1, std::vector< T > &v_out)
 Computes the cross product of two 3D vectors, returning a vector normal to both.
template<class T , class U >
bool mrpt::math::vectorsAreParallel2D (const T &v1, const U &v2)
 Returns true if two 2D vectors are parallel.
template<class T , class U >
bool mrpt::math::vectorsAreParallel3D (const T &v1, const U &v2)
 Returns true if two 3D vectors are parallel.
double MRPTDLLIMPEXP mrpt::math::minimumDistanceFromPointToSegment (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, double &out_x, double &out_y)
 Computes the closest point from a given point to a segment, and returns that minimum distance.
double MRPTDLLIMPEXP mrpt::math::minimumDistanceFromPointToSegment (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, float &out_x, float &out_y)
 Computes the closest point from a given point to a segment, and returns that minimum distance.
void MRPTDLLIMPEXP mrpt::math::closestFromPointToSegment (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, double &out_x, double &out_y)
 Computes the closest point from a given point to a segment.
void MRPTDLLIMPEXP mrpt::math::closestFromPointToLine (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, double &out_x, double &out_y)
 Computes the closest point from a given point to a (infinite) line.
double MRPTDLLIMPEXP mrpt::math::closestSquareDistanceFromPointToLine (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2)
 Returns the square distance from a point to a line.
template<typename T >
mrpt::math::distanceBetweenPoints (const T x1, const T y1, const T x2, const T y2)
 Returns the distance between 2 points in 2D.
template<typename T >
mrpt::math::distanceBetweenPoints (const T x1, const T y1, const T z1, const T x2, const T y2, const T z2)
 Returns the distance between 2 points in 3D.
template<typename T >
mrpt::math::distanceSqrBetweenPoints (const T x1, const T y1, const T x2, const T y2)
 Returns the square distance between 2 points in 2D.
template<typename T >
mrpt::math::distanceSqrBetweenPoints (const T x1, const T y1, const T z1, const T x2, const T y2, const T z2)
 Returns the square distance between 2 points in 3D.
bool MRPTDLLIMPEXP mrpt::math::SegmentsIntersection (const double &x1, const double &y1, const double &x2, const double &y2, const double &x3, const double &y3, const double &x4, const double &y4, double &ix, double &iy)
 Returns the intersection point, and if it exists, between two segments.
bool MRPTDLLIMPEXP mrpt::math::SegmentsIntersection (const double &x1, const double &y1, const double &x2, const double &y2, const double &x3, const double &y3, const double &x4, const double &y4, float &ix, float &iy)
 Returns the intersection point, and if it exists, between two segments.
bool MRPTDLLIMPEXP mrpt::math::pointIntoPolygon2D (const double &px, const double &py, unsigned int polyEdges, const double *poly_xs, const double *poly_ys)
 Returns true if the 2D point (px,py) falls INTO the given polygon.
template<typename T >
bool mrpt::math::pointIntoQuadrangle (T x, T y, T v1x, T v1y, T v2x, T v2y, T v3x, T v3y, T v4x, T v4y)
 Specialized method to check whether a point (x,y) falls into a quadrangle.
double MRPTDLLIMPEXP mrpt::math::distancePointToPolygon2D (const double &px, const double &py, unsigned int polyEdges, const double *poly_xs, const double *poly_ys)
 Returns the closest distance of a given 2D point to a polygon, or "0" if the point is INTO the polygon or its perimeter.
bool MRPTDLLIMPEXP mrpt::math::minDistBetweenLines (const double &p1_x, const double &p1_y, const double &p1_z, const double &p2_x, const double &p2_y, const double &p2_z, const double &p3_x, const double &p3_y, const double &p3_z, const double &p4_x, const double &p4_y, const double &p4_z, double &x, double &y, double &z, double &dist)
 Calculates the minimum distance between a pair of lines.
bool MRPTDLLIMPEXP mrpt::math::RectanglesIntersection (const double &R1_x_min, const double &R1_x_max, const double &R1_y_min, const double &R1_y_max, const double &R2_x_min, const double &R2_x_max, const double &R2_y_min, const double &R2_y_max, const double &R2_pose_x, const double &R2_pose_y, const double &R2_pose_phi)
 Returns wether two rotated rectangles intersect.
template<class T >
CMatrixTemplateNumeric< T > mrpt::math::generateAxisBaseFromDirection (T dx, T dy, T dz)
 Computes an axis base (a set of three 3D normal vectors) with the given vector being the first of them.
Simple intersection operations, relying basically on geometrical operations.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TSegment3D &s1, const TSegment3D &s2, TObject3D &obj)
 Gets the intersection between two 3D segments.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TSegment3D &s1, const TPlane &p2, TObject3D &obj)
 Gets the intersection between a 3D segment and a plane.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TSegment3D &s1, const TLine3D &r2, TObject3D &obj)
 Gets the intersection between a 3D segment and a 3D line.
bool mrpt::math::intersect (const TPlane &p1, const TSegment3D &s2, TObject3D &obj)
 Gets the intersection between a plane and a 3D segment.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPlane &p1, const TPlane &p2, TObject3D &obj)
 Gets the intersection between two planes.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPlane &p1, const TLine3D &p2, TObject3D &obj)
 Gets the intersection between a plane and a 3D line.
bool mrpt::math::intersect (const TLine3D &r1, const TSegment3D &s2, TObject3D &obj)
 Gets the intersection between a 3D line and a 3D segment.
bool mrpt::math::intersect (const TLine3D &r1, const TPlane &p2, TObject3D &obj)
 Gets the intersection between a 3D line and a plane.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TLine3D &r1, const TLine3D &r2, TObject3D &obj)
 Gets the intersection between two 3D lines.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TLine2D &r1, const TLine2D &r2, TObject2D &obj)
 Gets the intersection between two 2D lines.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TLine2D &r1, const TSegment2D &s2, TObject2D &obj)
 Gets the intersection between a 2D line and a 2D segment.
bool mrpt::math::intersect (const TSegment2D &s1, const TLine2D &r2, TObject2D &obj)
 Gets the intersection between a 2D line and a 2D segment.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TSegment2D &s1, const TSegment2D &s2, TObject2D &obj)
 Gets the intersection between two 2D segments.
Angle retrieval methods. Methods which use TSegments will automatically use TLines' implicit constructors.
double MRPTDLLIMPEXP mrpt::math::getAngle (const TPlane &p1, const TPlane &p2)
 Computes the angle between two planes.
double MRPTDLLIMPEXP mrpt::math::getAngle (const TPlane &p1, const TLine3D &r2)
 Computes the angle between a plane and a 3D line or segment (implicit constructor will be used if passing a segment instead of a line).
double mrpt::math::getAngle (const TLine3D &r1, const TPlane &p2)
 Computes the angle between a 3D line or segment and a plane (implicit constructor will be used if passing a segment instead of a line).
double MRPTDLLIMPEXP mrpt::math::getAngle (const TLine3D &r1, const TLine3D &r2)
 Computes the angle between two 3D lines or segments (implicit constructor will be used if passing a segment instead of a line).
double MRPTDLLIMPEXP mrpt::math::getAngle (const TLine2D &r1, const TLine2D &r2)
 Computes the angle between two 2D lines or segments (implicit constructor will be used if passing a segment instead of a line).
Creation of lines from poses.
void MRPTDLLIMPEXP mrpt::math::createFromPoseX (const CPose3D &p, TLine3D &r)
 Gets a 3D line corresponding to the X axis in a given pose.
void MRPTDLLIMPEXP mrpt::math::createFromPoseY (const CPose3D &p, TLine3D &r)
 Gets a 3D line corresponding to the Y axis in a given pose.
void MRPTDLLIMPEXP mrpt::math::createFromPoseZ (const CPose3D &p, TLine3D &r)
 Gets a 3D line corresponding to the Z axis in a given pose.
void MRPTDLLIMPEXP mrpt::math::createFromPoseAndVector (const CPose3D &p, const double(&vector)[3], TLine3D &r)
 Gets a 3D line corresponding to any arbitrary vector, in the base given by the pose.
void MRPTDLLIMPEXP mrpt::math::createFromPoseX (const TPose2D &p, TLine2D &r)
 Gets a 2D line corresponding to the X axis in a given pose.
void MRPTDLLIMPEXP mrpt::math::createFromPoseY (const TPose2D &p, TLine2D &r)
 Gets a 2D line corresponding to the Y axis in a given pose.
void MRPTDLLIMPEXP mrpt::math::createFromPoseAndVector (const TPose2D &p, const double(&vector)[2], TLine2D &r)
 Gets a 2D line corresponding to any arbitrary vector, in the base given the given pose.
Other line or plane related methods.
bool MRPTDLLIMPEXP mrpt::math::conformAPlane (const std::vector< TPoint3D > &points)
 Checks whether this polygon or set of points acceptably fits a plane.
bool MRPTDLLIMPEXP mrpt::math::conformAPlane (const std::vector< TPoint3D > &points, TPlane &p)
 Checks whether this polygon or set of points acceptably fits a plane, and if it's the case returns it in the second argument.
bool MRPTDLLIMPEXP mrpt::math::areAligned (const std::vector< TPoint2D > &points)
 Checks whether this set of points acceptably fits a 2D line.
bool MRPTDLLIMPEXP mrpt::math::areAligned (const std::vector< TPoint2D > &points, TLine2D &r)
 Checks whether this set of points acceptably fits a 2D line, and if it's the case returns it in the second argument.
bool MRPTDLLIMPEXP mrpt::math::areAligned (const std::vector< TPoint3D > &points)
 Checks whether this set of points acceptably fits a 3D line.
bool MRPTDLLIMPEXP mrpt::math::areAligned (const std::vector< TPoint3D > &points, TLine3D &r)
 Checks whether this set of points acceptably fits a 3D line, and if it's the case returns it in the second argument.
Projections
void mrpt::math::project3D (const TPoint3D &point, const CPose3D &newXYpose, TPoint3D &newPoint)
 Uses the given pose 3D to project a point into a new base.
void mrpt::math::project3D (const TSegment3D &segment, const CPose3D &newXYpose, TSegment3D &newSegment)
 Uses the given pose 3D to project a segment into a new base.
void MRPTDLLIMPEXP mrpt::math::project3D (const TLine3D &line, const CPose3D &newXYpose, TLine3D &newLine)
 Uses the given pose 3D to project a line into a new base.
void MRPTDLLIMPEXP mrpt::math::project3D (const TPlane &plane, const CPose3D &newXYpose, TPlane &newPlane)
 Uses the given pose 3D to project a plane into a new base.
void MRPTDLLIMPEXP mrpt::math::project3D (const TPolygon3D &polygon, const CPose3D &newXYpose, TPolygon3D &newPolygon)
 Uses the given pose 3D to project a polygon into a new base.
void MRPTDLLIMPEXP mrpt::math::project3D (const TObject3D &object, const CPose3D &newXYPose, TObject3D &newObject)
 Uses the given pose 3D to project any 3D object into a new base.
template<class T >
void mrpt::math::project3D (const T &obj, const TPlane &newXYPlane, T &newObj)
 Projects any 3D object into the plane's base, using its inverse pose.
template<class T >
void mrpt::math::project3D (const T &obj, const TPlane &newXYPlane, const TPoint3D &newOrigin, T &newObj)
 Projects any 3D object into the plane's base, using its inverse pose and forcing the position of the new coordinates origin.
template<class T >
void mrpt::math::project3D (const std::vector< T > &objs, const CPose3D &newXYpose, std::vector< T > &newObjs)
 Projects a set of 3D objects into the plane's base.
void mrpt::math::project2D (const TPoint2D &point, const CPose2D &newXpose, TPoint2D &newPoint)
 Uses the given pose 2D to project a point into a new base.
void mrpt::math::project2D (const TSegment2D &segment, const CPose2D &newXpose, TSegment2D &newSegment)
 Uses the given pose 2D to project a segment into a new base.
void MRPTDLLIMPEXP mrpt::math::project2D (const TLine2D &line, const CPose2D &newXpose, TLine2D &newLine)
 Uses the given pose 2D to project a line into a new base.
void MRPTDLLIMPEXP mrpt::math::project2D (const TPolygon2D &polygon, const CPose2D &newXpose, TPolygon2D &newPolygon)
 Uses the given pose 2D to project a polygon into a new base.
void MRPTDLLIMPEXP mrpt::math::project2D (const TObject2D &object, const CPose2D &newXpose, TObject2D &newObject)
 Uses the given pose 2D to project any 2D object into a new base.
template<class T >
void mrpt::math::project2D (const T &obj, const TLine2D &newXLine, T &newObj)
 Projects any 2D object into the line's base, using its inverse pose.
template<class T >
void mrpt::math::project2D (const T &obj, const TLine2D &newXLine, const TPoint2D &newOrigin, T &newObj)
 Projects any 2D object into the line's base, using its inverse pose and forcing the position of the new coordinate origin.
template<class T >
void mrpt::math::project2D (const std::vector< T > &objs, const CPose2D &newXpose, std::vector< T > &newObjs)
 Projects a set of 2D objects into the line's base.
Polygon intersections. These operations rely more on spatial reasoning than in raw numerical operations.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon2D &p1, const TSegment2D &s2, TObject2D &obj)
 Gets the intersection between a 2D polygon and a 2D segment.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon2D &p1, const TLine2D &r2, TObject2D &obj)
 Gets the intersection between a 2D polygon and a 2D line.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon2D &p1, const TPolygon2D &p2, TObject2D &obj)
 Gets the intersection between two 2D polygons.
bool mrpt::math::intersect (const TSegment2D &s1, const TPolygon2D &p2, TObject2D &obj)
 Gets the intersection between a 2D segment and a 2D polygon.
bool mrpt::math::intersect (const TLine2D &r1, const TPolygon2D &p2, TObject2D &obj)
 Gets the intersection between a 2D line and a 2D polygon.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon3D &p1, const TSegment3D &s2, TObject3D &obj)
 Gets the intersection between a 3D polygon and a 3D segment.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon3D &p1, const TLine3D &r2, TObject3D &obj)
 Gets the intersection between a 3D polygon and a 3D line.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon3D &p1, const TPlane &p2, TObject3D &obj)
 Gets the intersection between a 3D polygon and a plane.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TPolygon3D &p1, const TPolygon3D &p2, TObject3D &obj)
 Gets the intersection between two 3D polygons.
bool mrpt::math::intersect (const TSegment3D &s1, const TPolygon3D &p2, TObject3D &obj)
 Gets the intersection between a 3D segment and a 3D polygon.
bool mrpt::math::intersect (const TLine3D &r1, const TPolygon3D &p2, TObject3D &obj)
 Gets the intersection between a 3D line and a 3D polygon.
bool mrpt::math::intersect (const TPlane &p1, const TPolygon3D &p2, TObject3D &obj)
 Gets the intersection between a plane and a 3D polygon.
size_t MRPTDLLIMPEXP mrpt::math::intersect (const std::vector< TPolygon3D > &v1, const std::vector< TPolygon3D > &v2, CSparseMatrixTemplate< TObject3D > &objs)
 Gets the intersection between two sets of 3D polygons.
size_t MRPTDLLIMPEXP mrpt::math::intersect (const std::vector< TPolygon3D > &v1, const std::vector< TPolygon3D > &v2, std::vector< TObject3D > &objs)
 Gets the intersection between two sets of 3D polygons.
Other intersections
template<class T , class U , class O >
size_t mrpt::math::intersect (const std::vector< T > &v1, const std::vector< U > &v2, CSparseMatrixTemplate< O > &objs)
 Gets the intersection between vectors of geometric objects and returns it in a sparse matrix of either TObject2D or TObject3D.
template<class T , class U , class O >
size_t mrpt::math::intersect (const std::vector< T > &v1, const std::vector< U > &v2, std::vector< O > objs)
 Gets the intersection between vectors of geometric objects and returns it in a vector of either TObject2D or TObject3D.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TObject2D &o1, const TObject2D &o2, TObject2D &obj)
 Gets the intersection between any pair of 2D objects.
bool MRPTDLLIMPEXP mrpt::math::intersect (const TObject3D &o1, const TObject3D &o2, TObject3D &obj)
 Gets the intersection between any pair of 3D objects.
Distances
double MRPTDLLIMPEXP mrpt::math::distance (const TPoint2D &p1, const TPoint2D &p2)
 Gets the distance between two points in a 2D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPoint3D &p1, const TPoint3D &p2)
 Gets the distance between two points in a 3D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TLine2D &r1, const TLine2D &r2)
 Gets the distance between two lines in a 2D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TLine3D &r1, const TLine3D &r2)
 Gets the distance between two lines in a 3D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPlane &p1, const TPlane &p2)
 Gets the distance between two planes.
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon2D &p1, const TPolygon2D &p2)
 Gets the distance between two polygons in a 2D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon2D &p1, const TSegment2D &s2)
 Gets the distance between a polygon and a segment in a 2D space.
double mrpt::math::distance (const TSegment2D &s1, const TPolygon2D &p2)
 Gets the distance between a segment and a polygon in a 2D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon2D &p1, const TLine2D &l2)
 Gets the distance between a polygon and a line in a 2D space.
double mrpt::math::distance (const TLine2D &l1, const TPolygon2D &p2)
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon3D &p1, const TPolygon3D &p2)
 Gets the distance between two polygons in a 3D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon3D &p1, const TSegment3D &s2)
 Gets the distance between a polygon and a segment in a 3D space.
double mrpt::math::distance (const TSegment3D &s1, const TPolygon3D &p2)
 Gets the distance between a segment and a polygon in a 3D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon3D &p1, const TLine3D &l2)
 Gets the distance between a polygon and a line in a 3D space.
double mrpt::math::distance (const TLine3D &l1, const TPolygon3D &p2)
 Gets the distance between a line and a polygon in a 3D space.
double MRPTDLLIMPEXP mrpt::math::distance (const TPolygon3D &po, const TPlane &pl)
 Gets the distance between a polygon and a plane.
double mrpt::math::distance (const TPlane &pl, const TPolygon3D &po)
 Gets the distance between a plane and a polygon.
Bound checkers
void MRPTDLLIMPEXP mrpt::math::getRectangleBounds (const std::vector< TPoint2D > &poly, TPoint2D &pMin, TPoint2D &pMax)
 Gets the rectangular bounds of a 2D polygon or set of 2D points.
void MRPTDLLIMPEXP mrpt::math::getPrismBounds (const std::vector< TPoint3D > &poly, TPoint3D &pMin, TPoint3D &pMax)
 Gets the prism bounds of a 3D polygon or set of 3D points.
Creation of planes from poses
void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseXY (const CPose3D &pose, TPlane &plane)
 Given a pose, creates a plane orthogonal to its Z vector.
void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseXZ (const CPose3D &pose, TPlane &plane)
 Given a pose, creates a plane orthogonal to its Y vector.
void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseYZ (const CPose3D &pose, TPlane &plane)
 Given a pose, creates a plane orthogonal to its X vector.
void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseAndNormal (const CPose3D &pose, const double(&normal)[3], TPlane &plane)
 Given a pose and any vector, creates a plane orthogonal to that vector in the pose's coordinates.
void MRPTDLLIMPEXP mrpt::math::generateAxisBaseFromDirectionAndAxis (const double(&vec)[3], char coord, CMatrixDouble &matrix)
 Creates a rotation matrix so that the coordinate given (0 for x, 1 for y, 2 for z) corresponds to the vector.
Linear regression methods
double MRPTDLLIMPEXP mrpt::math::getRegressionLine (const std::vector< TPoint2D > &points, TLine2D &line)
 Using eigenvalues, gets the best fitting line for a set of 2D points.
double MRPTDLLIMPEXP mrpt::math::getRegressionLine (const std::vector< TPoint3D > &points, TLine3D &line)
 Using eigenvalues, gets the best fitting line for a set of 3D points.
double MRPTDLLIMPEXP mrpt::math::getRegressionPlane (const std::vector< TPoint3D > &points, TPlane &plane)
 Using eigenvalues, gets the best fitting plane for a set of 3D points.
Miscellaneous methods
void MRPTDLLIMPEXP mrpt::math::assemblePolygons (const std::vector< TSegment3D > &segms, std::vector< TPolygon3D > &polys)
 Tries to assemble a set of segments into a set of closed polygons.
void MRPTDLLIMPEXP mrpt::math::assemblePolygons (const std::vector< TSegment3D > &segms, std::vector< TPolygon3D > &polys, std::vector< TSegment3D > &remainder)
 Tries to assemble a set of segments into a set of closed polygons, returning the unused segments as another out parameter.
void MRPTDLLIMPEXP mrpt::math::assemblePolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys)
 Extracts all the polygons, including those formed from segments, from the set of objects.
void MRPTDLLIMPEXP mrpt::math::assemblePolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys, std::vector< TObject3D > &remainder)
 Extracts all the polygons, including those formed from segments, from the set of objects.
void MRPTDLLIMPEXP mrpt::math::assemblePolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys, std::vector< TSegment3D > &remainder1, std::vector< TObject3D > &remainder2)
 Extracts all the polygons, including those formed from segments, from the set of objects.
void mrpt::math::setEpsilon (double nE)
 Changes the value of the geometric epsilon.
double mrpt::math::getEpsilon ()
 Gets the value of the geometric epsilon.
bool MRPTDLLIMPEXP mrpt::math::splitInConvexComponents (const TPolygon2D &poly, vector< TPolygon2D > &components)
 Splits a 2D polygon into convex components.
bool MRPTDLLIMPEXP mrpt::math::splitInConvexComponents (const TPolygon3D &poly, vector< TPolygon3D > &components)
 Splits a 3D polygon into convex components.
void MRPTDLLIMPEXP mrpt::math::getSegmentBisector (const TSegment2D &sgm, TLine2D &bis)
 Gets the bisector of a 2D segment.
void MRPTDLLIMPEXP mrpt::math::getSegmentBisector (const TSegment3D &sgm, TPlane &bis)
 Gets the bisector of a 3D segment.
void MRPTDLLIMPEXP mrpt::math::getAngleBisector (const TLine2D &l1, const TLine2D &l2, TLine2D &bis)
 Gets the bisector of two lines or segments (implicit constructor will be used if necessary).
void MRPTDLLIMPEXP mrpt::math::getAngleBisector (const TLine3D &l1, const TLine3D &l2, TLine3D &bis)
 Gets the bisector of two lines or segments (implicit constructor will be used if necessary).

Variables

double mrpt::math::geometryEpsilon
 Global epsilon to overcome small precision errors.




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