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