23 std::array<double, 3>
coefs{{0, 0, 0}};
93 explicit TLine2D(
const TLine3D& l);
96 const TPoint2D& origin, TPose2D& outPose)
const;
void getUnitaryNormalVector(double(&vector)[2])
Get line's normal vector after unitarizing line.
double signedDistance(const TPoint2D &point) const
Distance with sign from a given point (sign indicates side).
bool contains(const TPoint2D &point) const
Check whether a point is inside the line.
void generate3DObject(TLine3D &l) const
Project into 3D space, setting the z to 0.
void getAsPose2D(TPose2D &outPose) const
constexpr TLine2D(double A, double B, double C)
Constructor from line's coefficients.
void getUnitaryDirectorVector(double(&vector)[2])
Unitarize line and then get director vector.
void getNormalVector(double(&vector)[2]) const
Get line's normal vector.
void unitarize()
Unitarize line's normal vector.
This base provides a set of functions for maths stuff.
2D segment, consisting of two points.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
std::array< double, 3 > coefs
Line coefficients, stored as an array: .
void getAsPose2DForcingOrigin(const TPoint2D &origin, TPose2D &outPose) const
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
double evaluatePoint(const TPoint2D &point) const
Evaluate point in the line's equation.
double distance(const TPoint2D &point) const
Distance from a given point.
void getDirectorVector(double(&vector)[2]) const
Get line's director vector.
TLine2D()=default
Fast default constructor.
3D line, represented by a base point and a director vector.
2D line without bounds, represented by its equation .