33 explicit Point3d(std::array<double, 3> x);
56 return const_cast<double&
>(
static_cast<const Point3d&
>(*this)[idx]);
60 const double*
data()
const {
return x_.data(); }
73 return std::lexicographical_compare(a.
data(), a.
data() + 3, b.
data(),
88bool lessEq(Point3d
const& a, Point3d
const& b,
89 double eps = std::numeric_limits<double>::epsilon());
94 os <<
p[0] <<
" " <<
p[1] <<
" " <<
p[2];
116 auto const sqr_dist(
sqrDist(a, b));
117 auto const eps = std::numeric_limits<double>::epsilon();
118 return (sqr_dist < eps * eps);
125 return (p0[0] - p1[0]) * (p0[0] - p1[0]) +
126 (p0[1] - p1[1]) * (p0[1] - p1[1]);
const double & operator[](std::size_t idx) const
const access operator The access to the point coordinates is like the access to a field....
double & operator[](std::size_t idx)
access operator (see book Effektiv C++ programmieren - subsection 1.3.2 ).
Eigen::Vector3d const & asEigenVector3d() const
Point3d & operator=(Point3d const &)=default
const double * data() const
Eigen::Vector3d & asEigenVector3d()
Point3d(Point3d const &)=default
virtual ~Point3d()=default
bool operator<(Point3d const &a, Point3d const &b)
MathLib::Point3d operator*(Eigen::Matrix3d const &mat, MathLib::Point3d const &p)
std::ostream & operator<<(std::ostream &os, const Point3d &p)
bool operator==(Point3d const &a, Point3d const &b)
double sqrDist2d(MathLib::Point3d const &p0, MathLib::Point3d const &p1)
bool lessEq(Point3d const &a, Point3d const &b, double eps)
double sqrDist(MathLib::Point3d const &p0, MathLib::Point3d const &p1)