# HG changeset patch # User Robert Tubb # Date 1360005968 0 # Node ID 5b659bc0b572f267d2d894c6f4e986fdabe44c9c # Parent 085d80989ba76fba3adc2d0c7907b2569025f21c line mesh for supernatant diff -r 085d80989ba7 -r 5b659bc0b572 lump.mm --- 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; diff -r 085d80989ba7 -r 5b659bc0b572 mesh.mm --- 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); } + } //-------------------------------------------------------------- diff -r 085d80989ba7 -r 5b659bc0b572 scanpath.h --- 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 diff -r 085d80989ba7 -r 5b659bc0b572 testApp.mm --- 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); }