|
Namespaces |
namespace | mrpt |
| The main namespace for all the Mobile Robot Programming Toolkit (MRPT) C++ libraries.
|
namespace | mrpt::math |
| This base provides a set of functions for maths stuff.
|
Functions |
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.
|
double MRPTDLLIMPEXP | mrpt::math::distanceBetweenPoints (const double x1, const double y1, const double x2, const double y2) |
| Returns the distance between 2 points in 2D.
|
double MRPTDLLIMPEXP | mrpt::math::distanceBetweenPoints (const double x1, const double y1, const double z1, const double x2, const double y2, const double z2) |
| Returns the distance between 3 points in 3D.
|
double MRPTDLLIMPEXP | mrpt::math::distanceSqrBetweenPoints (const double x1, const double y1, const double x2, const double y2) |
| Returns the square distance between 2 points in 2D.
|
double MRPTDLLIMPEXP | mrpt::math::distanceSqrBetweenPoints (const double x1, const double y1, const double z1, const double x2, const double y2, const double z2) |
| Returns the square distance between 3 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.
|
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.
|
template<class T > |
void | mrpt::math::crossProduct3D (T x0, T y0, T z0, T x1, T y1, T z1, T &x_out, T &y_out, T &z_out) |
| 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.
|