2D line without bounds, represented by its equation .
Definition at line 708 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... | |
void | getAsPose2D (mrpt::poses::CPose2D &outPose) const |
Get a pose2D whose X axis corresponds to the line. More... | |
void | getAsPose2DForcingOrigin (const TPoint2D &origin, mrpt::poses::CPose2D &outPose) const |
Get a pose2D whose X axis corresponds to the line, forcing the base point to one given. More... | |
TLine2D (const TPoint2D &p1, const TPoint2D &p2) throw (std::logic_error) | |
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... | |
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... | |
Public Attributes | |
double | coefs [3] |
Line coefficients, stored as an array: ![]() | |
Constructor from two points, through which the line will pass.
logic_error | if both points are the same |
|
explicit |
Constructor from a segment.
|
inline |
Fast default constructor.
Initializes to garbage.
Definition at line 783 of file lightweight_geom_data.h.
|
inline |
Constructor from line's coefficients.
Definition at line 787 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. |
bool mrpt::math::TLine2D::contains | ( | const TPoint2D & | point | ) | const |
Check whether a point is inside the line.
double mrpt::math::TLine2D::distance | ( | const TPoint2D & | point | ) | const |
Distance from a given point.
double mrpt::math::TLine2D::evaluatePoint | ( | const TPoint2D & | point | ) | const |
Evaluate point in the line's equation.
void mrpt::math::TLine2D::generate3DObject | ( | TLine3D & | l | ) | const |
Project into 3D space, setting the z to 0.
void mrpt::math::TLine2D::getAsPose2D | ( | mrpt::poses::CPose2D & | outPose | ) | const |
Get a pose2D whose X axis corresponds to the line.
Referenced by mrpt::math::project2D().
void mrpt::math::TLine2D::getAsPose2DForcingOrigin | ( | const TPoint2D & | origin, |
mrpt::poses::CPose2D & | outPose | ||
) | const |
Get a pose2D whose X axis corresponds to the line, forcing the base point to one given.
logic_error | if the point is not inside the line. |
Referenced by mrpt::math::project2D().
void mrpt::math::TLine2D::getDirectorVector | ( | double(&) | vector[2] | ) | const |
Get line's director vector.
void mrpt::math::TLine2D::getNormalVector | ( | double(&) | vector[2] | ) | const |
Get line's normal vector.
|
inline |
Unitarize line and then get director vector.
Definition at line 752 of file lightweight_geom_data.h.
|
inline |
Get line's normal vector after unitarizing line.
Definition at line 741 of file lightweight_geom_data.h.
double mrpt::math::TLine2D::signedDistance | ( | const TPoint2D & | point | ) | const |
Distance with sign from a given point (sign indicates side).
void mrpt::math::TLine2D::unitarize | ( | ) |
Unitarize line's normal vector.
double mrpt::math::TLine2D::coefs[3] |
Line coefficients, stored as an array: .
Definition at line 713 of file lightweight_geom_data.h.
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 |