15 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
18 Plane() { coefficients_.setZero(); }
25 Plane(
const Eigen::Matrix<double, 4, 1>& coefficients) : coefficients_(coefficients) {}
34 Plane(
double a,
double b,
double c,
double d) { coefficients_ <<
a,
b,
c,
d; }
51 throw std::runtime_error(
"Index out of range, should be max 3.");
52 return coefficients_(i);
56 double a() {
return coefficients_[AIdx]; }
58 double b() {
return coefficients_[BIdx]; }
60 double c() {
return coefficients_[CIdx]; }
62 double d() {
return coefficients_[DIdx]; }
64 void set(
double a,
double b,
double c,
double d) { coefficients_ <<
a,
b,
c,
d; };
72 double solveX(
double y,
double z) {
return (
d() -
b() * y -
c() * z) /
a(); }
80 double solveY(
double x,
double z) {
return (
d() -
a() * x -
c() * z) /
b(); }
88 double solveZ(
double x,
double y) {
return (
d() -
a() * x -
b() * y) /
c(); }
98 Eigen::Matrix<double, 4, 1> coefficients_;
double d()
get d
Definition: Plane.h:62
Plane(double a, double b, double c, double d)
constructor
Definition: Plane.h:34
double b()
get b
Definition: Plane.h:58
double solveY(double x, double z)
solve for y
Definition: Plane.h:80
Eigen::Matrix< double, 4, 1 > & getCoefficients()
returns the coefficients
Definition: Plane.h:41
double & getCoefficient(size_t i)
returns a single coefficient
Definition: Plane.h:48
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Plane()
default constructor
Definition: Plane.h:18
double solveX(double y, double z)
solve for x
Definition: Plane.h:72
double c()
get c
Definition: Plane.h:60
Implements a geometrical 3D plane of type .
Definition: Plane.h:12
double a()
get a
Definition: Plane.h:56
Plane(const Eigen::Matrix< double, 4, 1 > &coefficients)
constructor
Definition: Plane.h:25
double solveZ(double x, double y)
solve for z
Definition: Plane.h:88