Alvaro Cassinelli
/
skinGames_II
save loops
Diff: classSpring.h
- Revision:
- 0:df6fdd9b99f0
diff -r 000000000000 -r df6fdd9b99f0 classSpring.h --- /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