From 0e8f0361c1068eb4c2f634dfcf4e1762d87f40d2 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sat, 31 Mar 2012 16:44:02 +0100 Subject: implementing trap door --- morpher/src/testApp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'morpher/src/testApp.cpp') diff --git a/morpher/src/testApp.cpp b/morpher/src/testApp.cpp index 41b04eb..3b5779e 100644 --- a/morpher/src/testApp.cpp +++ b/morpher/src/testApp.cpp @@ -28,8 +28,11 @@ void testApp::update(){ void testApp::draw(){ //calculate morph targets float segment=(sin(ofGetElapsedTimef())*0.5)+0.5; + vector targets; vector weights; + targets.push_back(0); weights.push_back(segment); + targets.push_back(1); weights.push_back(1.0-segment); //printf("drawing %f %f\n",segment,1.0-segment); @@ -41,7 +44,7 @@ void testApp::draw(){ ofRotate(yr,1,0,0); ofRotate(180,1,0,0); ofScale(2.0,2.0,2.0); - mesh.draw(weights); + mesh.draw(targets,weights); ofPopMatrix(); unbindTexture(texture); -- cgit v1.2.3