![](/media/cache/profiles/68a15b5278e4f7c4c056df9d5f1d3b1f.jpg.50x50_q85.jpg)
save loops
Diff: classSpring.h
- Revision:
- 0:df6fdd9b99f0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/classSpring.h Tue Dec 02 04:39:15 2014 +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