summaryrefslogtreecommitdiff
path: root/morpher/src/testApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'morpher/src/testApp.cpp')
-rw-r--r--morpher/src/testApp.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/morpher/src/testApp.cpp b/morpher/src/testApp.cpp
index 3b5779e..a55ee13 100644
--- a/morpher/src/testApp.cpp
+++ b/morpher/src/testApp.cpp
@@ -4,16 +4,16 @@
void testApp::setup(){
mesh=morphmesh();
//mesh.loadfile("Bird-test1.xml");
- if (mesh.loadfile("Bird-test.xml")) printf("mesh loaded with %i vertices, %i face indices, %i targets\n",mesh.getNumVertices(),mesh.getNumIndices(),mesh.getNumTargets());
+ if (mesh.loadMesh("Bird-test.xml")) printf("mesh loaded with %i vertices, %i face indices, %i targets\n",mesh.getNumVertices(),mesh.getNumIndices(),mesh.getNumTargets());
else printf("XML not parsed\n");
texture.loadImage("texture2.jpg");
-
+
xr=yr=0;
xo=yo=0;
-
+
glEnable(GL_DEPTH_TEST);
-
+
//movieExporter.setup();
}
@@ -28,14 +28,14 @@ void testApp::update(){
void testApp::draw(){
//calculate morph targets
float segment=(sin(ofGetElapsedTimef())*0.5)+0.5;
- vector<int> targets;
+ vector<string> targets;
vector<float> weights;
- targets.push_back(0);
+ targets.push_back("bird 2");
weights.push_back(segment);
- targets.push_back(1);
+ targets.push_back("bird");
weights.push_back(1.0-segment);
//printf("drawing %f %f\n",segment,1.0-segment);
-
+
ofBackground(0,0,0);
bindTexture(texture);
ofPushMatrix();
@@ -47,7 +47,7 @@ void testApp::draw(){
mesh.draw(targets,weights);
ofPopMatrix();
unbindTexture(texture);
-
+
ofSetHexColor(0xFFFFFF);
ofDrawBitmapString("fps: "+ofToString(ofGetFrameRate(), 2), 10, 15);
}