26 std::array<double, 4>
coefs{{.0, .0, .0, .0}};
84 constexpr
TPlane(
double A,
double B,
double C,
double D) :
coefs{
A, B, C, D}
92 for (
size_t i = 0; i < 4; i++)
coefs[i] = vec[i];
bool contains(const TSegment3D &segment) const
Check whether a segment is fully contained into the plane.
double distance(const TPoint3D &point) const
Distance to 3D point.
TPoint3D point1
Origin point.
This base provides a set of functions for maths stuff.
TPlane(const double(&vec)[4])
Constructor from an array of coefficients.
void getUnitaryNormalVector(double(&vec)[3]) const
Get normal vector.
3D segment, consisting of two points.
TPoint3D point2
Destiny point.
void unitarize()
Unitarize normal vector.
3D Plane, represented by its equation
constexpr TPlane(double A, double B, double C, double D)
Constructor from plane coefficients.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
TVector3D getNormalVector() const
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)
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void getAsPose3D(mrpt::math::TPose3D &outPose) const
double evaluatePoint(const TPoint3D &point) const
Evaluate a point in the plane's equation.
TPlane()=default
Fast default constructor.
std::array< double, 4 > coefs
Plane coefficients, stored as an array: .
bool contains(const TPoint3D &point) const
Check whether a point is contained into the plane.
void getAsPose3DForcingOrigin(const TPoint3D ¢er, TPose3D &pose) const
3D line, represented by a base point and a director vector.