ReTo  0.3.7
reto::ClippingPlane Class Reference

Class to manage a clipping plane. More...

#include <ClippingSystem.h>

+ Collaboration diagram for reto::ClippingPlane:

Public Member Functions

 ClippingPlane (const reto::ClippingMode &clippingMode=ClippingMode::Global)
 ClippingPlane constructor. More...
 
 ClippingPlane (const float &a, const float &b, const float &c, const float &d, const reto::ClippingMode &clippingMode=ClippingMode::Global)
 ClippingPlane constructor. More...
 
 ~ClippingPlane (void)
 ClippingPlane destructor.
 
std::vector< float > getEquation (void) const
 Method to get the clipping plane equation. More...
 
void setEquation (const float &a, const float &b, const float &c, const float &d)
 Method to set the clipping plane equation. More...
 
void setEquationByPointAndNormal (const Eigen::Vector3f &point, const Eigen::Vector3f &normal)
 Method to set the clipping plane equation. More...
 
void setEquationByPointAndVectors (const Eigen::Vector3f &point, const Eigen::Vector3f &vector1, const Eigen::Vector3f &vector2)
 Method to set the clipping plane equation. More...
 
void setEquationByPoints (const Eigen::Vector3f &point1, const Eigen::Vector3f &point2, const Eigen::Vector3f &point3)
 Method to set the clipping plane equation. More...
 
reto::ClippingMode getClippingMode (void) const
 Method to get the plane clipping mode. More...
 
void setClippingMode (const reto::ClippingMode &clippingMode)
 Method to set the plane clipping mode. More...
 
void activate (reto::ShaderProgram *program, const unsigned int &index) const
 Method to activate the clipping plane and activate it's uniforms. More...
 
void deactivate (const unsigned int &index) const
 Method to deactivate the clipping plane. More...
 
void clear (void)
 Method to clear clipping plane.
 

Detailed Description

Class to manage a clipping plane.

Definition at line 59 of file ClippingSystem.h.

Constructor & Destructor Documentation

reto::ClippingPlane::ClippingPlane ( const reto::ClippingMode &  clippingMode = ClippingMode::Global)

ClippingPlane constructor.

Parameters
clippingModeclipping mode (global or local, global by default)
reto::ClippingPlane::ClippingPlane ( const float &  a,
const float &  b,
const float &  c,
const float &  d,
const reto::ClippingMode &  clippingMode = ClippingMode::Global 
)

ClippingPlane constructor.

Parameters
ax coefficient
by coefficient
cz coefficient
ddistance from the origin
clippingModeclipping mode (global or local, global by default)

Member Function Documentation

void reto::ClippingPlane::activate ( reto::ShaderProgram program,
const unsigned int &  index 
) const

Method to activate the clipping plane and activate it's uniforms.

Parameters
programprogram pointer
indexindex of clipping plane
void reto::ClippingPlane::deactivate ( const unsigned int &  index) const

Method to deactivate the clipping plane.

Parameters
indexindex of clipping plane
reto::ClippingMode reto::ClippingPlane::getClippingMode ( void  ) const

Method to get the plane clipping mode.

Returns
clipping mode
std::vector< float > reto::ClippingPlane::getEquation ( void  ) const

Method to get the clipping plane equation.

Returns
clipping plane equation
void reto::ClippingPlane::setClippingMode ( const reto::ClippingMode &  clippingMode)

Method to set the plane clipping mode.

Parameters
clippingModeclipping mode (global or local)
void reto::ClippingPlane::setEquation ( const float &  a,
const float &  b,
const float &  c,
const float &  d 
)

Method to set the clipping plane equation.

Parameters
ax coefficient
by coefficient
cz coefficient
ddistance from the origin
void reto::ClippingPlane::setEquationByPointAndNormal ( const Eigen::Vector3f &  point,
const Eigen::Vector3f &  normal 
)

Method to set the clipping plane equation.

Parameters
pointpoint on the plane
normalnormal vector
void reto::ClippingPlane::setEquationByPointAndVectors ( const Eigen::Vector3f &  point,
const Eigen::Vector3f &  vector1,
const Eigen::Vector3f &  vector2 
)

Method to set the clipping plane equation.

Parameters
pointpoint on the plane
vector1vector on the plane
vector2vector on the plane
void reto::ClippingPlane::setEquationByPoints ( const Eigen::Vector3f &  point1,
const Eigen::Vector3f &  point2,
const Eigen::Vector3f &  point3 
)

Method to set the clipping plane equation.

Parameters
point1point on the plane
point2point on the plane
point3point on the plane

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