58 throw std::out_of_range(
"index out of range");
71 throw std::out_of_range(
"index out of range");
double x
X,Y,Z coordinates.
TSegment3D(const TSegment2D &s)
Constructor from 2D object.
bool operator<(const TSegment3D &s) const
TPoint3D point1
Origin point.
This base provides a set of functions for maths stuff.
2D segment, consisting of two points.
double distance(const TPoint3D &point) const
Distance to point.
3D segment, consisting of two points.
TPoint3D point2
Destiny point.
const TPoint3D & operator[](size_t i) const
Access to points using operator[0-1].
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
void getCenter(TPoint3D &p) const
Segment's central point.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
TPoint3D & operator[](size_t i)
Access to points using operator[0-1].
bool contains(const TPoint3D &point) const
Check whether a point is inside the segment.
void generate2DObject(TSegment2D &s) const
Projection into 2D space, discarding the z.
TSegment3D(const TPoint3D &p1, const TPoint3D &p2)
Constructor from both points.
constexpr bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
constexpr bool operator!=(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
double length() const
Segment length.
TSegment3D()=default
Fast default constructor.