CustusX  22.04-rc5
An IGT application
Plane3D Class Reference

#include <plane3d.hpp>

Public Member Functions

 Plane3D (const double coeffs[4])
 
 Plane3D (const Eigen::Matrix4f coeffs)
 
 Plane3D (const Eigen::Matrix4d coeffs)
 
 Plane3D ()
 
 ~Plane3D ()
 
void setCoefficient (const int i, const double c)
 
double getCoefficient (const int i)
 
double getDistance (double const pt[3]) const
 

Protected Attributes

double m_coeffs [4]
 

Detailed Description

Representation of the plane equation ax + by + cz + d = dist

Definition at line 11 of file plane3d.hpp.

Constructor & Destructor Documentation

Plane3D::Plane3D ( const double  coeffs[4])
inline

Coefficient constructor - simply copy the given coefficients

Parameters
coeffsCoefficients {a,b,c,d}

Definition at line 19 of file plane3d.hpp.

Plane3D::Plane3D ( const Eigen::Matrix4f  coeffs)
inline

Matrix constructor - treat the z axis of the rotation part of the matrix as a normal vector

Parameters
coeffsMatrix to construct from

Definition at line 31 of file plane3d.hpp.

Plane3D::Plane3D ( const Eigen::Matrix4d  coeffs)
inline

Matrix constructor - treat the z axis of the rotation part of the matrix as a normal vector

Parameters
coeffsMatrix to construct from

Definition at line 49 of file plane3d.hpp.

Plane3D::Plane3D ( )
inline

Zero constructor. Initialize coefficients to zero

Definition at line 66 of file plane3d.hpp.

Plane3D::~Plane3D ( )
inline

Definition at line 73 of file plane3d.hpp.

Member Function Documentation

double Plane3D::getCoefficient ( const int  i)
inline

Get a coefficient

Parameters
icoefficient to get
Returns
coefficient

Definition at line 89 of file plane3d.hpp.

double Plane3D::getDistance ( double const  pt[3]) const
inline

Get distance from the plane to a point

Parameters
ptpoint to find distance to
Returns
distance to point

Definition at line 98 of file plane3d.hpp.

void Plane3D::setCoefficient ( const int  i,
const double  c 
)
inline

Set a coefficient

Parameters
icoefficient to set
cvalue to set it to

Definition at line 80 of file plane3d.hpp.

Member Data Documentation

double Plane3D::m_coeffs[4]
protected

Project a point onto the plane

Parameters
projectedProjected point will be returned here
ptPoint to project The plane equation coefficients a,b,c,d

Definition at line 123 of file plane3d.hpp.


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