Mercurial > hg > wabletios
changeset 6:5b659bc0b572
line mesh for supernatant
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 04 Feb 2013 19:26:08 +0000 |
parents | 085d80989ba7 |
children | 8584d661c8da |
files | lump.mm mesh.mm scanpath.h testApp.mm |
diffstat | 4 files changed, 24 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lump.mm Mon Dec 10 16:20:57 2012 +0000 +++ b/lump.mm Mon Feb 04 19:26:08 2013 +0000 @@ -82,9 +82,12 @@ //cout << "constraining lump "<< endl; } + //-------------------------------------------------------------- void Lump::constrain(ConstrainMode aconstrainMode){ - constrained = true; + if(aconstrainMode == CONSTRAIN_XY){ + constrained = true; + } constrainMode = aconstrainMode; setZeroRefPos(); //cout << "constraining lump "<< endl;
--- a/mesh.mm Mon Dec 10 16:20:57 2012 +0000 +++ b/mesh.mm Mon Feb 04 19:26:08 2013 +0000 @@ -1614,10 +1614,15 @@ makeDefaultScanPath(); - constrain(0.0,0.0,CONSTRAIN_EDGES); + setPropagationSpeed(0.6); + for(int i = 0; i < lumps.size(); i++){ + lumps[i].constrain(Lump::CONSTRAIN_X); + } + + constrain(0.0,0.0,CONSTRAIN_EDGES); cout << "constructed LINE mesh\n"; } @@ -1651,6 +1656,7 @@ connect(i,i); connect(i,i+1); } + } //--------------------------------------------------------------
--- a/scanpath.h Mon Dec 10 16:20:57 2012 +0000 +++ b/scanpath.h Mon Feb 04 19:26:08 2013 +0000 @@ -31,6 +31,7 @@ bool audioAccessing; bool updateAccessing; + bool bidirectional; //Spring ** springPath; // springpath - an array of pointers to the springs in the path // lump path - ditto should be same number
--- a/testApp.mm Mon Dec 10 16:20:57 2012 +0000 +++ b/testApp.mm Mon Feb 04 19:26:08 2013 +0000 @@ -124,12 +124,13 @@ if(audioAccessFlag) return; // or rather wait ! meshConstructionFlag = TRUE; static int type = 0; - int numTypes = 6; + int numTypes = 7; // TODO: Just empty vectors - - if (type % numTypes == 0){ + if(type % numTypes == 0){ + theMesh = new LineMesh(60); + }else if (type % numTypes == 1){ // different for iphone if(ofGetWidth() == 480){ //PHONE theMesh = new SpiderCrossMesh(60,5); @@ -138,19 +139,19 @@ theMesh = new SpiderCrossMesh(100,9); } - }else if(type % numTypes ==1){ + }else if(type % numTypes ==2){ + theMesh = new LineMesh(2520); - theMesh = new SpiderCrossMesh(30,30); - }else if(type % numTypes ==2){ + }else if(type % numTypes ==3){ + theMesh = new SquareCrossMesh(28,28); - theMesh = new SpiderCrossMesh(8,20); - }else if(type % numTypes ==3){ + }else if(type % numTypes ==4){ theMesh = new TriangleMesh(34,34); - }else if(type % numTypes ==4){ + }else if(type % numTypes ==5){ + theMesh = new SpiderCrossMesh(30,30); - theMesh = new SquareCrossMesh(28,28); - }else if(type % numTypes ==5){ + }else if(type % numTypes ==6){ theMesh = new DropletMesh(128); }