comparison lump.h @ 4:79c7cf39a0a0

Fixed new mesh crash - static array bounds. Made home made mutex for wavetable access. Less clicks?
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 10 Dec 2012 13:00:03 +0000
parents c667dfe12d47
children 085d80989ba7
comparison
equal deleted inserted replaced
3:d346ddc50f70 4:79c7cf39a0a0
16 class Spring; 16 class Spring;
17 class Lump { 17 class Lump {
18 private: 18 private:
19 double mass, inverseMass; 19 double mass, inverseMass;
20 bool grabbed, highlighted; 20 bool grabbed, highlighted;
21 const int maxSprings; 21
22
23 TwoVector velocity; 22 TwoVector velocity;
24 TwoVector accel; 23 TwoVector accel;
25 double friction; 24 double friction;
26 25
27 public: 26 public:
28 bool constrained; 27 bool constrained;
29 Spring** attachedSprings; // pointers to all attached springs 28 vector<Spring*> attachedSprings; // pointers to all attached springs
30 int numAttachedSprings; 29 int numAttachedSprings;
31 30
32 enum ConstrainMode {NOT_CONSTRAINED,CONSTRAIN_X,CONSTRAIN_Y,CONSTRAIN_XY}; 31 enum ConstrainMode {NOT_CONSTRAINED,CONSTRAIN_X,CONSTRAIN_Y,CONSTRAIN_XY};
33 ConstrainMode constrainMode; 32 ConstrainMode constrainMode;
34 33
35 bool isInScanPath; 34 bool isInScanPath;
36 35 bool isScanPathEnd;
36 bool isScanPathStart;
37
37 TwoVector position; 38 TwoVector position;
38 TwoVector previousPosition; 39 TwoVector previousPosition;
39 double totalForceMag; 40 double totalForceMag;
40 double size; 41 double size;
41 int grabID; // which touch is this lump grabbed by? 42 int grabID; // which touch is this lump grabbed by?