3D line, represented by a base point and a director vector.
Definition at line 803 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Member Functions | |
| bool | contains (const TPoint3D &point) const |
| Check whether a point is inside the line. More... | |
| double | distance (const TPoint3D &point) const |
| Distance between the line and a point. More... | |
| void | unitarize () |
| Unitarize director vector. More... | |
| void | getDirectorVector (double(&vector)[3]) const |
| Get director vector. More... | |
| void | getUnitaryDirectorVector (double(&vector)[3]) |
| Unitarize and then get director vector. More... | |
| void | generate2DObject (TLine2D &l) const |
| Project into 2D space, discarding the Z coordinate. More... | |
| TLine3D (const TPoint3D &p1, const TPoint3D &p2) throw (std::logic_error) | |
| Constructor from two points, through which the line will pass. More... | |
| TLine3D (const TSegment3D &s) | |
| Constructor from 3D segment. More... | |
| TLine3D () | |
| Fast default constructor. More... | |
| TLine3D (const TLine2D &l) | |
| Implicit constructor from 2D object. More... | |
Public Attributes | |
| TPoint3D | pBase |
| Base point. More... | |
| double | director [3] |
| Director vector. More... | |
Constructor from two points, through which the line will pass.
| std::logic_error | if both points are the same. |
|
explicit |
Constructor from 3D segment.
|
inline |
Fast default constructor.
Initializes to garbage.
Definition at line 857 of file lightweight_geom_data.h.
| mrpt::math::TLine3D::TLine3D | ( | const TLine2D & | l | ) |
Implicit constructor from 2D object.
Zeroes the z.
| bool mrpt::math::TLine3D::contains | ( | const TPoint3D & | point | ) | const |
Check whether a point is inside the line.
| double mrpt::math::TLine3D::distance | ( | const TPoint3D & | point | ) | const |
Distance between the line and a point.
|
inline |
Project into 2D space, discarding the Z coordinate.
| std::logic_error | if the line's director vector is orthogonal to the XY plane. |
Definition at line 842 of file lightweight_geom_data.h.
|
inline |
Get director vector.
Definition at line 828 of file lightweight_geom_data.h.
|
inline |
Unitarize and then get director vector.
Definition at line 834 of file lightweight_geom_data.h.
| void mrpt::math::TLine3D::unitarize | ( | ) |
Unitarize director vector.
| double mrpt::math::TLine3D::director[3] |
Director vector.
Definition at line 812 of file lightweight_geom_data.h.
| TPoint3D mrpt::math::TLine3D::pBase |
Base point.
Definition at line 808 of file lightweight_geom_data.h.
| Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Fri Sep 3 01:11:30 UTC 2021 |