summaryrefslogtreecommitdiff
path: root/tshirtmapping
diff options
context:
space:
mode:
Diffstat (limited to 'tshirtmapping')
-rwxr-xr-xtshirtmapping/src/testApp.cpp33
-rwxr-xr-xtshirtmapping/src/testApp.h5
-rwxr-xr-xtshirtmapping/tshirtmapping.layout4
3 files changed, 5 insertions, 37 deletions
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;
+
+
};
diff --git a/tshirtmapping/tshirtmapping.layout b/tshirtmapping/tshirtmapping.layout
index fa3b053..e6802b6 100755
--- a/tshirtmapping/tshirtmapping.layout
+++ b/tshirtmapping/tshirtmapping.layout
@@ -14,9 +14,9 @@
<Cursor position="185" topLine="0" />
</File>
<File name="src/testApp.cpp" open="1" top="1" tabpos="2">
- <Cursor position="2252" topLine="84" />
+ <Cursor position="1607" topLine="56" />
</File>
<File name="src/testApp.h" open="1" top="0" tabpos="1">
- <Cursor position="987" topLine="7" />
+ <Cursor position="991" topLine="9" />
</File>
</CodeBlocks_layout_file>