My Project
Loading...
Searching...
No Matches
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.
 
 ~cGELLinearSpring ()
 Destructor of cGELLinearSpring.
 
void render ()
 This method graphically renders this spring using OpenGL.
 
void computeForces ()
 This method computes the forces that are applied on the mass nodes.
 

Public Attributes

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

Static Public Attributes

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

Constructor & Destructor Documentation

◆ cGELLinearSpring()

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

Constructor of cGELLinearSpring.

Parameters
a_node0Node 0.
a_node1Node 1.

◆ ~cGELLinearSpring()

cGELLinearSpring::~cGELLinearSpring ( )

Destructor of cGELLinearSpring.

Member Function Documentation

◆ render()

void cGELLinearSpring::render ( )
inline

◆ computeForces()

void cGELLinearSpring::computeForces ( )
inline

Member Data Documentation

◆ m_color

chai3d::cColorf cGELLinearSpring::m_color

◆ m_node0

cGELMassParticle* cGELLinearSpring::m_node0

◆ m_node1

cGELMassParticle* cGELLinearSpring::m_node1

◆ m_kSpringElongation

double cGELLinearSpring::m_kSpringElongation

◆ m_enabled

bool cGELLinearSpring::m_enabled

◆ m_kDamperElongation

double cGELLinearSpring::m_kDamperElongation

◆ m_length0

double cGELLinearSpring::m_length0

◆ s_default_kSpringElongation

double cGELLinearSpring::s_default_kSpringElongation = 100.0
static

◆ s_default_color

cColorf cGELLinearSpring::s_default_color
static

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