45#ifndef CGELLinearSpringH
46#define CGELLinearSpringH
103 glColor4fv( (
const float *)&
m_color);
123 double m_length = m_link01.
length();
129 if (m_length < 0.000001) {
return; }
135 if (m_length > 0.000001)
Implementation of a mass particle.
This class implements a linear spring between two mass particles.
Definition CGELLinearSpring.h:72
static double s_default_kSpringElongation
Default property - linear stiffness.
Definition CGELLinearSpring.h:194
chai3d::cColorf m_color
Color property used for displaying link.
Definition CGELLinearSpring.h:152
double m_kDamperElongation
Linear damping.
Definition CGELLinearSpring.h:181
double m_kSpringElongation
Linear spring constant.
Definition CGELLinearSpring.h:175
static chai3d::cColorf s_default_color
Default property - color property.
Definition CGELLinearSpring.h:197
cGELMassParticle * m_node1
Node 1 of current link.
Definition CGELLinearSpring.h:165
double m_length0
Initial length of link.
Definition CGELLinearSpring.h:184
void computeForces()
This method computes the forces that are applied on the mass nodes.
Definition CGELLinearSpring.h:119
~cGELLinearSpring()
Destructor of cGELLinearSpring.
Definition CGELLinearSpring.cpp:94
bool m_enabled
Is link enabled?
Definition CGELLinearSpring.h:178
void render()
This method graphically renders this spring using OpenGL.
Definition CGELLinearSpring.h:98
cGELMassParticle * m_node0
Node 0 of current link.
Definition CGELLinearSpring.h:162
This class implements a simple mass particle point.
Definition CGELMassParticle.h:70
void addForce(chai3d::cVector3d &a_force)
This method adds a force to this mass particle.
Definition CGELMassParticle.h:94
chai3d::cVector3d m_pos
Position of particle.
Definition CGELMassParticle.h:220