Public Member Functions | Public Attributes | Protected Attributes

Spring Class Reference

class which a contains all methods to work with springs: control their length, etc. More...

#include <Spring.h>

List of all members.

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

Massmass1
 mass1 which is connected to one side of the spring
Massmass2
 mass2 which is connected to one side of the spring

Protected Attributes

ngl::TransformStack * m_transform
 a pointer to the global transform stack

Detailed Description

class which a contains all methods to work with springs: control their length, etc.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables