Mercurial > hg > wabletios
diff scanpath.h @ 3:d346ddc50f70
Vectorised a few things. Fiddled with new mesh creator... not solved much.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Fri, 07 Dec 2012 19:20:57 +0000 |
parents | c667dfe12d47 |
children | 5b659bc0b572 |
line wrap: on
line diff
--- a/scanpath.h Thu Nov 22 17:58:34 2012 +0000 +++ b/scanpath.h Fri Dec 07 19:20:57 2012 +0000 @@ -12,7 +12,16 @@ #include "lump.h" #include "spring.h" #include <vector> - +struct Element{ + Lump * eLump; + Spring * eSpring; + Element(Lump * aLump, Spring * aSpring){ + eLump = aLump; + eSpring = aSpring; + + }; + +}; class ScanPath{ private: @@ -24,10 +33,9 @@ //Spring ** springPath; // springpath - an array of pointers to the springs in the path - // lump path - ditto should be same number - Lump ** lumpPath; - Spring ** springPath; - + // lump path - ditto should be same number + vector<Element> pathElements; + double * wavetableNew; double * wavetableOld; double * wavetableUpdate; @@ -48,7 +56,7 @@ ScanPath(); ~ScanPath(); - + void init(); void inscribe(double ax,double ay); void clear(); @@ -67,7 +75,7 @@ double getNextSampleCubic(double aPhasor); // redone stuff void initWavetables(); - void addElement(Lump* aLump, Spring * aSpring); + void addElement(Lump* const aLump, Spring * const aSpring); void updateWavetables();