class which a contains all methods to work with springs: control their length, etc. More...
#include <Spring.h>
Public Member Functions | |
Spring (Mass *mass1, Mass *mass2, ngl::TransformStack *_transform) | |
void | draw () |
method to draw the spring using points | |
void | correctSpringLength () |
method used to bring masses of the spring which are too far away from each other to a reasonable distance | |
void | setStiffeness (float _stiffeness) |
set the STIFFENESS [in] _stiffeness the value to set | |
float | getStiffeness () |
get the STIFFENESS | |
void | setDamping (float _damping) |
set the DAMPING [in] _damping the value to set | |
float | getDamping () |
get the DAMPING | |
void | UpdateSpring () |
Updates the spring. | |
Public Attributes | |
Mass * | mass1 |
mass1 which is connected to one side of the spring | |
Mass * | mass2 |
mass2 which is connected to one side of the spring | |
Protected Attributes | |
ngl::TransformStack * | m_transform |
a pointer to the global transform stack |
class which a contains all methods to work with springs: control their length, etc.