From 4656e88bb1626fcc0e7941883ac475884e4c99b0 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 11 Nov 2012 15:59:00 +0000 Subject: working single threaded --- tshirtmapping/src/testApp.cpp | 33 +-------------------------------- tshirtmapping/src/testApp.h | 5 ++--- 2 files changed, 3 insertions(+), 35 deletions(-) (limited to 'tshirtmapping/src') diff --git a/tshirtmapping/src/testApp.cpp b/tshirtmapping/src/testApp.cpp index dd00b8f..9b7124a 100755 --- a/tshirtmapping/src/testApp.cpp +++ b/tshirtmapping/src/testApp.cpp @@ -65,6 +65,7 @@ void testApp::setup(){ filterFactor = 10.0f; recordContext.setup(); + recordContext.setMirror(true); recordDepth.setup(&recordContext); recordImage.setup(&recordContext); recordUser.setup(&recordContext); @@ -90,38 +91,6 @@ void testApp::update(){ recordUser.update(); } -void testApp::setCam(){ - - ofNode c=ofNode(); - ofNode t=ofNode(); - t.setParent(c); - t.setPosition(vars[1].getVal(),vars[2].getVal(),vars[3].getVal()); - //make target controls relative to rotation - c.rotate(vars[5].getVal(), ofVec3f(0, 1, 0)); - - target.setPosition(t.getGlobalPosition()); - //camera.orbit(vars[5].getVal(), vars[4].getVal(), vars[7].getVal(), target); - camera.setFov(vars[0].getVal()); - if (vertigo) { - //distance=width/(2 tan (fov *0.5) - //multiply distance by ratio of tans of fov before and after - vars[7].setVal((tan((vars[0].readVal()-vars[0].inc)*PI*0.0027777)*vars[7].readVal())/tan(vars[0].readVal()*PI*0.0027777)); - } - - - - ofVec3f p(0, 0, vars[7].getVal()); - //p.rotate(ofClamp(vars[2].getVal(), -89, 89), ofVec3f(1, 0, 0)); - p.rotate(vars[4].getVal(), ofVec3f(1, 0, 0)); - p.rotate(vars[5].getVal(), ofVec3f(0, 1, 0)); - p += target.getPosition(); - camera.setPosition(p); - - camera.lookAt(target,ofVec3f(0,1,0).rotate(vars[6].getVal(),ofVec3f(0,0,1)).rotate(vars[5].getVal(),ofVec3f(0,1,0))); - light.setPosition(camera.getGlobalPosition()); - -} - //-------------------------------------------------------------- void testApp::draw(){ ofSetColor(255, 255, 255); diff --git a/tshirtmapping/src/testApp.h b/tshirtmapping/src/testApp.h index 9af276a..1b68f8a 100755 --- a/tshirtmapping/src/testApp.h +++ b/tshirtmapping/src/testApp.h @@ -41,8 +41,7 @@ class testApp : public ofBaseApp{ bool draw3D; float camRotationY; - - ofCamera camera; - ofNode target; + + }; -- cgit v1.2.3