cGELLinearSpring Class Reference

This class implements a linear spring between two mass particles.

#include <CGELLinearSpring.h>

Public Member Functions

 cGELLinearSpring (cGELMassParticle *a_node0, cGELMassParticle *a_node1)
 Constructor of cGELLinearSpring. More...
 
 ~cGELLinearSpring ()
 Destructor of cGELLinearSpring. More...
 
void render ()
 This method graphically renders this spring using OpenGL. More...
 
void computeForces ()
 This method computes the forces that are applied on the mass nodes. More...
 

Public Attributes

chai3d::cColorf m_color
 Color property used for displaying link. More...
 
cGELMassParticle * m_node0
 Node 0 of current link. More...
 
cGELMassParticle * m_node1
 Node 1 of current link. More...
 
double m_kSpringElongation
 Linear spring constant. More...
 
bool m_enabled
 Is link enabled? More...
 
double m_kDamperElongation
 Linear damping. More...
 
double m_length0
 Initial length of link. More...
 

Static Public Attributes

static double s_default_kSpringElongation = 100.0
 Default property - linear stiffness. More...
 
static chai3d::cColorf s_default_color
 Default property - color property. More...
 

Constructor & Destructor Documentation

cGELLinearSpring::cGELLinearSpring ( cGELMassParticle *  a_node0,
cGELMassParticle *  a_node1 
)

Constructor of cGELLinearSpring.

Parameters
a_node0Node 0.
a_node1Node 1.
cGELLinearSpring::~cGELLinearSpring ( )

Destructor of cGELLinearSpring.

Member Function Documentation

void cGELLinearSpring::render ( )
inline
void cGELLinearSpring::computeForces ( )
inline

Member Data Documentation

chai3d::cColorf cGELLinearSpring::m_color
cGELMassParticle* cGELLinearSpring::m_node0
cGELMassParticle* cGELLinearSpring::m_node1
double cGELLinearSpring::m_kSpringElongation
bool cGELLinearSpring::m_enabled
double cGELLinearSpring::m_kDamperElongation
double cGELLinearSpring::m_length0
double cGELLinearSpring::s_default_kSpringElongation = 100.0
static
cColorf cGELLinearSpring::s_default_color
static

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