Alvaro Cassinelli / Mbed 2 deprecated skinGames_forktest

Dependencies:   mbed

Fork of scoreLight_Advanced by Alvaro Cassinelli

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers classSpring.h Source File

classSpring.h

00001 #ifndef SPRING_H
00002 #define SPRING_H
00003 
00004 // Springs between particles of the active contour:
00005 
00006 #include "classPointMass.h"
00007 
00008 class spring {
00009 
00010     public:
00011 
00012         spring();
00013         
00014         pointMass * massA;
00015         pointMass * massB;
00016         
00017         float distance;
00018         float springiness;     // this is the k, springiness constant
00019     
00020         void update(); // add forces to both point masses
00021         void assymetricUpdate(); // only second mass suffers a force
00022          
00023     
00024 };
00025 
00026 
00027 #endif