cGELMassParticle Class Reference

This class implements a simple mass particle point.

#include <CGELMassParticle.h>

Public Member Functions

 cGELMassParticle ()
 Constructor of cGELMassParticle. More...
 
virtual ~cGELMassParticle ()
 Destructor of cGELMassParticle. More...
 
void setMass (double a_mass)
 This method assigns the mass of this particle. More...
 
void addForce (chai3d::cVector3d &a_force)
 This method adds a force to this mass particle. More...
 
void setExternalForce (chai3d::cVector3d &a_force)
 This method assigns an external force to this mass particle. More...
 
void computeNextPose (double a_timeInterval)
 This method updates the simulation over a specified time interval. More...
 
void applyNextPose ()
 This method updates the position with its latest computed values. More...
 
void clearForces ()
 This method clears all forces. More...
 
void clearExternalForces ()
 This method clears all external forces. More...
 
void render ()
 This method renders this node in OpenGL. More...
 

Public Attributes

double m_mass
 Mass property. More...
 
chai3d::cVector3d m_force
 Current force being applied. More...
 
chai3d::cVector3d m_acc
 Instant acceleration. More...
 
chai3d::cVector3d m_vel
 Instant velocity. More...
 
double m_kDampingPos
 Linear damping. More...
 
bool m_fixed
 If true, then mass is fixed in space and cannot move. More...
 
bool m_useGravity
 If true, then gravity field is taken into account. More...
 
chai3d::cVector3d m_gravity
 Gravity field. More...
 
chai3d::cColorf m_color
 Color used to display nodes. More...
 
chai3d::cVector3d m_pos
 Position of particle. More...
 
chai3d::cVector3d m_nextPos
 Next computed position of particle. More...
 

Static Public Attributes

static double s_default_kDampingPos = 5.00
 Default property - linear damping. More...
 
static double s_default_mass = 0.1
 Default property - mass. More...
 
static chai3d::cColorf s_default_color
 Default property - color. More...
 
static bool s_default_useGravity = true
 Default property - use of gravity field. More...
 
static chai3d::cVector3d s_default_gravity
 Default property - gravity field. More...
 
static bool s_show_forces = true
 Default property - force display status. More...
 
static bool s_scale_force_vector_display = true
 Default property - force vector display magnitude. More...
 

Constructor & Destructor Documentation

cGELMassParticle::cGELMassParticle ( )

Constructor of cGELMassParticle.

cGELMassParticle::~cGELMassParticle ( )
virtual

Destructor of cGELMassParticle.

Member Function Documentation

void cGELMassParticle::setMass ( double  a_mass)

This method assigns a mass value passed as argument to this particle.

Parameters
a_massMass of particle.
void cGELMassParticle::addForce ( chai3d::cVector3d &  a_force)
inline
void cGELMassParticle::setExternalForce ( chai3d::cVector3d &  a_force)
inline
void cGELMassParticle::computeNextPose ( double  a_timeInterval)
inline
void cGELMassParticle::applyNextPose ( )
inline
void cGELMassParticle::clearForces ( )
inline
void cGELMassParticle::clearExternalForces ( )
inline
void cGELMassParticle::render ( )
inline

Member Data Documentation

double cGELMassParticle::m_mass
chai3d::cVector3d cGELMassParticle::m_force
chai3d::cVector3d cGELMassParticle::m_acc
chai3d::cVector3d cGELMassParticle::m_vel
double cGELMassParticle::m_kDampingPos
bool cGELMassParticle::m_fixed
bool cGELMassParticle::m_useGravity
chai3d::cVector3d cGELMassParticle::m_gravity
chai3d::cColorf cGELMassParticle::m_color
chai3d::cVector3d cGELMassParticle::m_pos
chai3d::cVector3d cGELMassParticle::m_nextPos
double cGELMassParticle::s_default_kDampingPos = 5.00
static
double cGELMassParticle::s_default_mass = 0.1
static
cColorf cGELMassParticle::s_default_color
static
bool cGELMassParticle::s_default_useGravity = true
static
cVector3d cGELMassParticle::s_default_gravity
static
bool cGELMassParticle::s_show_forces = true
static
bool cGELMassParticle::s_scale_force_vector_display = true
static

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