MRPT
1.9.9
|
3D segment, consisting of two points.
Definition at line 20 of file TSegment3D.h.
#include <mrpt/math/TSegment3D.h>
Public Member Functions | |
double | length () const |
Segment length. More... | |
double | distance (const TPoint3D &point) const |
Distance to point. More... | |
double | distance (const TSegment3D &segment) const |
Distance to another segment. More... | |
bool | contains (const TPoint3D &point) const |
Check whether a point is inside the segment. More... | |
TPoint3D & | operator[] (size_t i) |
Access to points using operator[0-1]. More... | |
const TPoint3D & | operator[] (size_t i) const |
Access to points using operator[0-1]. More... | |
void | generate2DObject (TSegment2D &s) const |
Projection into 2D space, discarding the z. More... | |
void | getCenter (TPoint3D &p) const |
Segment's central point. More... | |
TSegment3D (const TPoint3D &p1, const TPoint3D &p2) | |
Constructor from both points. More... | |
TSegment3D ()=default | |
Fast default constructor. More... | |
TSegment3D (const TSegment2D &s) | |
Constructor from 2D object. More... | |
bool | operator< (const TSegment3D &s) const |
Public Attributes | |
TPoint3D | point1 |
origin point More... | |
TPoint3D | point2 |
final point More... | |
Constructor from both points.
Definition at line 80 of file TSegment3D.h.
|
default |
Fast default constructor.
Initializes to garbage.
|
inlineexplicit |
bool TSegment3D::contains | ( | const TPoint3D & | point | ) | const |
Check whether a point is inside the segment.
Definition at line 112 of file TSegment3D.cpp.
References mrpt::math::distance(), mrpt::math::getEpsilon(), point1, and point2.
Referenced by mrpt::math::intersect().
double TSegment3D::distance | ( | const TPoint3D & | point | ) | const |
Distance to point.
Definition at line 26 of file TSegment3D.cpp.
References mrpt::math::TLine3D::distance(), mrpt::math::distance(), point1, and point2.
double TSegment3D::distance | ( | const TSegment3D & | segment | ) | const |
Distance to another segment.
Definition at line 32 of file TSegment3D.cpp.
References mrpt::math::TPoint3D_< T >::asVector(), point1, and point2.
void TSegment3D::generate2DObject | ( | TSegment2D & | s | ) | const |
Projection into 2D space, discarding the z.
Definition at line 20 of file TSegment3D.cpp.
|
inline |
Segment's central point.
Definition at line 71 of file TSegment3D.h.
References point1, point2, mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
Referenced by mrpt::math::getSegmentBisector().
double TSegment3D::length | ( | ) | const |
Segment length.
Definition at line 25 of file TSegment3D.cpp.
References mrpt::math::distance(), point1, and point2.
bool TSegment3D::operator< | ( | const TSegment3D & | s | ) | const |
Definition at line 120 of file TSegment3D.cpp.
|
inline |
Access to points using operator[0-1].
Definition at line 39 of file TSegment3D.h.
|
inline |
Access to points using operator[0-1].
Definition at line 52 of file TSegment3D.h.
TPoint3D mrpt::math::TSegment3D::point1 |
origin point
Definition at line 23 of file TSegment3D.h.
Referenced by mrpt::math::TPlane::contains(), contains(), distance(), getCenter(), mrpt::math::getSegmentBisector(), length(), mrpt::math::operator!=(), operator<(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), operator[](), mrpt::math::TLine3D::TLine3D(), and mrpt::math::TSegment2D::TSegment2D().
TPoint3D mrpt::math::TSegment3D::point2 |
final point
Definition at line 24 of file TSegment3D.h.
Referenced by mrpt::math::TPlane::contains(), contains(), distance(), getCenter(), mrpt::math::getSegmentBisector(), length(), mrpt::math::operator!=(), operator<(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), operator[](), mrpt::math::TLine3D::TLine3D(), and mrpt::math::TSegment2D::TSegment2D().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020 |