MRPT
1.9.9
|
2D line without bounds, represented by its equation .
Definition at line 1155 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Member Functions | |
double | evaluatePoint (const TPoint2D &point) const |
Evaluate point in the line's equation. More... | |
bool | contains (const TPoint2D &point) const |
Check whether a point is inside the line. More... | |
double | distance (const TPoint2D &point) const |
Distance from a given point. More... | |
double | signedDistance (const TPoint2D &point) const |
Distance with sign from a given point (sign indicates side). More... | |
void | getNormalVector (double(&vector)[2]) const |
Get line's normal vector. More... | |
void | unitarize () |
Unitarize line's normal vector. More... | |
void | getUnitaryNormalVector (double(&vector)[2]) |
Get line's normal vector after unitarizing line. More... | |
void | getDirectorVector (double(&vector)[2]) const |
Get line's director vector. More... | |
void | getUnitaryDirectorVector (double(&vector)[2]) |
Unitarize line and then get director vector. More... | |
void | generate3DObject (TLine3D &l) const |
Project into 3D space, setting the z to 0. More... | |
TLine2D (const TPoint2D &p1, const TPoint2D &p2) | |
Constructor from two points, through which the line will pass. More... | |
TLine2D (const TSegment2D &s) | |
Constructor from a segment. More... | |
TLine2D () | |
Fast default constructor. More... | |
constexpr | TLine2D (double A, double B, double C) |
Constructor from line's coefficients. More... | |
TLine2D (const TLine3D &l) | |
Construction from 3D object, discarding the Z. More... | |
void | getAsPose2D (TPose2D &outPose) const |
void | getAsPose2DForcingOrigin (const TPoint2D &origin, TPose2D &outPose) const |
Public Attributes | |
double | coefs [3] |
Line coefficients, stored as an array: . More... | |
Constructor from two points, through which the line will pass.
logic_error | if both points are the same |
Definition at line 719 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
explicit |
Constructor from a segment.
Definition at line 726 of file lightweight_geom_data.cpp.
References coefs.
|
inline |
Fast default constructor.
Initializes to garbage.
Definition at line 1222 of file lightweight_geom_data.h.
|
inline |
Constructor from line's coefficients.
Definition at line 1226 of file lightweight_geom_data.h.
|
explicit |
Construction from 3D object, discarding the Z.
std::logic_error | if the line is normal to the XY plane. |
Definition at line 733 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::TLine3D::director, mrpt::math::getEpsilon(), mrpt::math::TLine3D::pBase, mrpt::math::TPoint3D::x, and mrpt::math::TPoint3D::y.
bool mrpt::math::TLine2D::contains | ( | const TPoint2D & | point | ) | const |
Check whether a point is inside the line.
Definition at line 663 of file lightweight_geom_data.cpp.
References distance(), and mrpt::math::getEpsilon().
Referenced by getAsPose2DForcingOrigin(), and mrpt::math::intersect().
double mrpt::math::TLine2D::distance | ( | const TPoint2D & | point | ) | const |
Distance from a given point.
Definition at line 667 of file lightweight_geom_data.cpp.
References coefs, and evaluatePoint().
Referenced by contains(), mrpt::math::distance(), and mrpt::vision::matchFeatures().
double mrpt::math::TLine2D::evaluatePoint | ( | const TPoint2D & | point | ) | const |
Evaluate point in the line's equation.
Definition at line 659 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
Referenced by distance(), mrpt::math::TPolygon2D::isConvex(), and signedDistance().
Project into 3D space, setting the z to 0.
Definition at line 692 of file lightweight_geom_data.cpp.
Definition at line 693 of file lightweight_geom_data.cpp.
References coefs, mrpt::math::getEpsilon(), mrpt::math::TPose2D::phi, mrpt::math::TPose2D::x, and mrpt::math::TPose2D::y.
Referenced by mrpt::math::intersect(), and mrpt::math::project2D().
void mrpt::math::TLine2D::getAsPose2DForcingOrigin | ( | const TPoint2D & | origin, |
TPose2D & | outPose | ||
) | const |
Definition at line 710 of file lightweight_geom_data.cpp.
References coefs, contains(), and mrpt::math::TPose2D::phi.
Referenced by mrpt::math::project2D().
void mrpt::math::TLine2D::getDirectorVector | ( | double(&) | vector[2] | ) | const |
Get line's director vector.
Definition at line 687 of file lightweight_geom_data.cpp.
References coefs.
Referenced by getUnitaryDirectorVector().
void mrpt::math::TLine2D::getNormalVector | ( | double(&) | vector[2] | ) | const |
Get line's normal vector.
Definition at line 677 of file lightweight_geom_data.cpp.
References coefs.
Referenced by getUnitaryNormalVector().
|
inline |
Unitarize line and then get director vector.
Definition at line 1201 of file lightweight_geom_data.h.
References getDirectorVector(), and unitarize().
|
inline |
Get line's normal vector after unitarizing line.
Definition at line 1189 of file lightweight_geom_data.h.
References getNormalVector(), and unitarize().
double mrpt::math::TLine2D::signedDistance | ( | const TPoint2D & | point | ) | const |
Distance with sign from a given point (sign indicates side).
Definition at line 672 of file lightweight_geom_data.cpp.
References coefs, and evaluatePoint().
Referenced by mrpt::math::TSegment2D::signedDistance().
void mrpt::math::TLine2D::unitarize | ( | ) |
Unitarize line's normal vector.
Definition at line 682 of file lightweight_geom_data.cpp.
References coefs.
Referenced by mrpt::math::getAngleBisector(), mrpt::math::getSegmentBisector(), getUnitaryDirectorVector(), and getUnitaryNormalVector().
double mrpt::math::TLine2D::coefs[3] |
Line coefficients, stored as an array: .
Definition at line 1161 of file lightweight_geom_data.h.
Referenced by mrpt::math::distance(), distance(), evaluatePoint(), EXPLICIT_INST_ransac_detect_3D_planes(), mrpt::math::getAngle(), mrpt::math::getAngleBisector(), getAsPose2D(), getAsPose2DForcingOrigin(), getDirectorVector(), getNormalVector(), mrpt::math::getRegressionLine(), mrpt::math::getSegmentBisector(), mrpt::math::intersect(), intersectInCommonLine(), mrpt::vision::matchFeatures(), mrpt::math::operator<<(), mrpt::math::operator>>(), mrpt::math::project2D(), signedDistance(), TLine2D(), mrpt::math::TLine3D::TLine3D(), and unitarize().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |