Struct TSegment2D
Defined in File TSegment2D.h
Inheritance Relationships
Base Type
public mrpt::Stringifyable
Struct Documentation
-
struct TSegment2D : public mrpt::Stringifyable
2D segment, consisting of two points.
See also
Public Functions
-
TSegment2D() = default
Fast default constructor. Initializes to (0,0)-(0,0)
-
explicit TSegment2D(const TSegment3D &s)
Explicit constructor from 3D object, discarding the z.
-
double length() const
Segment length.
-
double signedDistance(const TPoint2D &point) const
Distance with sign to point (sign indicates which side the point is)
-
void generate3DObject(TSegment3D &s) const
Project into 3D space, setting the z to 0.
-
bool operator<(const TSegment2D &s) const
-
virtual std::string asString() const override
Public Static Functions
-
static inline TSegment2D FromPoints(const TPoint2D &p1, const TPoint2D &p2)
Static method, returns segment from two points.
-
TSegment2D() = default