- 3.0.2 core module.
ct::core::Plane Class Reference

Implements a geometrical 3D plane of type $ ax + by + cz = d $. More...

#include <Plane.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Plane ()
 default constructor More...
 
 Plane (const Eigen::Matrix< double, 4, 1 > &coefficients)
 constructor More...
 
 Plane (double a, double b, double c, double d)
 constructor More...
 
Eigen::Matrix< double, 4, 1 > & getCoefficients ()
 returns the coefficients More...
 
double & getCoefficient (size_t i)
 returns a single coefficient More...
 
double a ()
 get a More...
 
double b ()
 get b More...
 
double c ()
 get c More...
 
double d ()
 get d More...
 
void set (double a, double b, double c, double d)
 sets the plane More...
 
double solveX (double y, double z)
 solve for x More...
 
double solveY (double x, double z)
 solve for y More...
 
double solveZ (double x, double y)
 solve for z More...
 

Detailed Description

Implements a geometrical 3D plane of type $ ax + by + cz = d $.

Constructor & Destructor Documentation

◆ Plane() [1/3]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW ct::core::Plane::Plane ( )
inline

default constructor

◆ Plane() [2/3]

ct::core::Plane::Plane ( const Eigen::Matrix< double, 4, 1 > &  coefficients)
inline

constructor

constructs a plane $ ax + by + cz = d $ where the coefficients are ordered as $ \begin{bmatrix} a & b & c & d \end{bmatrix} $

Parameters
coefficientsplane coefficients

◆ Plane() [3/3]

ct::core::Plane::Plane ( double  a,
double  b,
double  c,
double  d 
)
inline

constructor

constructs a plane $ ax + by + cz = d $

Parameters
acoefficient a
bcoefficient b
ccoefficient c
dcoefficient d

References a(), b(), c(), and d().

Member Function Documentation

◆ getCoefficients()

Eigen::Matrix<double, 4, 1>& ct::core::Plane::getCoefficients ( )
inline

returns the coefficients

returns the coefficients of the plane $ ax + by + cz = d $ in order $ \begin{bmatrix} a & b & c & d \end{bmatrix} $

Returns
planecoefficients

◆ getCoefficient()

double& ct::core::Plane::getCoefficient ( size_t  i)
inline

returns a single coefficient

returns a single coefficient by index, where 0=a, 1=b, 2=c and 3=d

Parameters
iindex, needs to be smaller than 4
Returns
reference of the coefficient

◆ a()

double ct::core::Plane::a ( )
inline

get a

Referenced by Plane(), set(), solveX(), solveY(), and solveZ().

◆ b()

double ct::core::Plane::b ( )
inline

get b

Referenced by Plane(), set(), solveX(), solveY(), and solveZ().

◆ c()

double ct::core::Plane::c ( )
inline

get c

Referenced by Plane(), set(), solveX(), solveY(), and solveZ().

◆ d()

double ct::core::Plane::d ( )
inline

get d

Referenced by Plane(), set(), solveX(), solveY(), and solveZ().

◆ set()

void ct::core::Plane::set ( double  a,
double  b,
double  c,
double  d 
)
inline

sets the plane

References a(), b(), c(), and d().

◆ solveX()

double ct::core::Plane::solveX ( double  y,
double  z 
)
inline

solve for x

finds the x value for the plane $ ax + by + cz = d $ given y and z

Parameters
yy-value
zz-value
Returns
x-value

References a(), b(), c(), and d().

◆ solveY()

double ct::core::Plane::solveY ( double  x,
double  z 
)
inline

solve for y

finds the y value for the plane $ ax + by + cz = d $ given x and z

Parameters
xx-value
zz-value
Returns
y-value

References a(), b(), c(), and d().

◆ solveZ()

double ct::core::Plane::solveZ ( double  x,
double  y 
)
inline

solve for z

finds the z value for the plane $ ax + by + cz = d $ given x and y

Parameters
xx-value
yy-value
Returns
z-value

References a(), b(), c(), and d().


The documentation for this class was generated from the following file: