From 6c5c2bfefe583c682a5ec1e6704b64c962a5a1c9 Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 25 Jun 2013 01:28:53 +0100 Subject: good craic --- 06_performance/src/testApp.cpp | 66 +++++++++++++++++++++++++++++++++++++++--- 06_performance/src/testApp.h | 1 + 2 files changed, 63 insertions(+), 4 deletions(-) (limited to '06_performance/src') diff --git a/06_performance/src/testApp.cpp b/06_performance/src/testApp.cpp index 746d52f..db45680 100644 --- a/06_performance/src/testApp.cpp +++ b/06_performance/src/testApp.cpp @@ -17,11 +17,11 @@ void testApp::setup(){ midiIn.listPorts(); - midiIn.openPort(0); //this was 1 on linux, 0 on OSX + midiIn.openPort(1); //this was 1 on linux, 0 on OSX midiIn.addListener(this); midiOut.listPorts(); - midiOut.openPort(0); //this was 1 on linux, 0 on OSX + midiOut.openPort(1); //this was 1 on linux, 0 on OSX // 0 output channeLs, // 2 input channels @@ -101,7 +101,7 @@ void testApp::setup(){ F_zRotation=0; F_particleAmount=2000; //100 - F_particleLife=1.5; //0.5 + F_particleLife=0.75; //0.5 I_fade1=0; I_fade2=0; @@ -170,6 +170,10 @@ void testApp::setup(){ } xOffs=startX=yOffs=startY=0; + xModel=0; + yModel=0; + zModel=-400; + sModel=1.0f; }; @@ -248,6 +252,7 @@ void testApp::update(){ xOffs*=.95; yOffs*=.95; + } //-------------------------------------------------------------- @@ -413,7 +418,11 @@ void testApp::draw(){ } ofPushMatrix(); - ofTranslate(0,-100,-1050); + //ofTranslate(0,-100,-1050); + ofScale(sModel,sModel,sModel); + //ofTranslate(xModel*sModel,yModel*sModel,zModel*sModel); + ofTranslate(xModel,yModel,zModel); + //narrator.drawCloud(2); narrator.drawPoints(F_lineWidth,F_particleAmount,F_particleLife,F_particleX,F_particleY,F_particleZ); ofPopMatrix(); @@ -552,6 +561,7 @@ void testApp::draw(){ msg+="\n"+ofToString(F_xRotation, 4)+" "+ofToString(F_yRotation, 4)+" "+ofToString(F_zRotation, 4); msg+="\n"+ofToString(F_yseg, 4); msg+="\n"+ofToString(narrator.getNumParticles())+" size "+ofToString(F_lineWidth); + msg+="\n"+ofToString(xModel)+","+ofToString(yModel)+","+ofToString(zModel)+" * "+ofToString(sModel); ofDrawBitmapString(msg,20,20); } } @@ -584,6 +594,54 @@ void testApp::keyPressed (int key){ } } } + if(key == 'r'){ + yModel+=25; + } + if(key == 'v'){ + yModel-=25; + } + if(key == 'd'){ + xModel+=25; + } + if(key == 'g'){ + xModel-=25; + } + if(key == 't'){ + zModel+=25; + } + if(key == 'c'){ + zModel-=25; + } + if(key == 'y'){ + sModel*=1.02; + } + if(key == 'h'){ + sModel/=1.02; + } + if(key == 'h'){ + F_particleX-=1; + } + if(key == 'k'){ + + F_particleX+=1; + } + if(key == 'm'){ + F_particleY-=1; + } + if(key == 'u'){ + + F_particleY+=1; + } + if(key == 'i'){ + F_particleZ+=1; + } + if(key == 'n'){ + + F_particleZ-=1; + } + float F_particleX; + float F_particleY; + float F_particleZ; } diff --git a/06_performance/src/testApp.h b/06_performance/src/testApp.h index 504cc53..4ecc24d 100644 --- a/06_performance/src/testApp.h +++ b/06_performance/src/testApp.h @@ -186,6 +186,7 @@ class testApp : public ofBaseApp, public ofxMidiListener{ ofxOscReceiver receiver; float xOffs,startX,yOffs,startY; + float xModel,yModel,zModel,sModel; }; #endif -- cgit v1.2.3