![](/media/cache/profiles/68a15b5278e4f7c4c056df9d5f1d3b1f.jpg.50x50_q85.jpg)
just a test
Fork of scoreLight_Advanced by
Diff: classSpring.h
- Revision:
- 0:345b3bc7a0ea
- Child:
- 30:d8af03f01cd4
diff -r 000000000000 -r 345b3bc7a0ea classSpring.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/classSpring.h Wed Mar 28 14:40:01 2012 +0000 @@ -0,0 +1,27 @@ +#ifndef SPRING_H +#define SPRING_H + +// Springs between particles of the active contour: + +#include "classPointMass.h" + +class spring { + + public: + + spring(); + + pointMass * massA; + pointMass * massB; + + float distance; + float springiness; // this is the k, springiness constant + + void update(); // add forces to both point masses + void assymetricUpdate(); // only second mass suffers a force + + +}; + + +#endif