diff options
Diffstat (limited to 'gaunt01/src/testApp.cpp')
| -rw-r--r-- | gaunt01/src/testApp.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gaunt01/src/testApp.cpp b/gaunt01/src/testApp.cpp index efd9459..db133c8 100644 --- a/gaunt01/src/testApp.cpp +++ b/gaunt01/src/testApp.cpp @@ -23,6 +23,8 @@ void testApp::setup(){ this->windowWidth = ofGetWidth(); this->windowHeight = ofGetHeight(); } + + mirror=true; bLearnBakground = true; cam_angle=0; @@ -99,7 +101,7 @@ void testApp::setup(){ cam.setPosition(windowWidth/2,windowHeight/2,-windowWidth); cam.lookAt(ofVec3f(windowWidth/2,windowHeight/2,0),ofVec3f(0, -1, 0)); cam.setFov(41.1); //39.85); //53.13); - cam.cacheMatrices(); //stop error messages + cam.cacheMatrices(); //stop error messages - changed API? testpts=new ofVec3f[4]; @@ -459,6 +461,8 @@ void testApp::update(){ colorImg.setFromPixels(vidPlayer.getPixels(), 640,480); //accumImg.setFromPixels(vidPlayer.getPixels(), 640,480); } + + if (mirror) colorImg.mirror(false,true); colorImg.updateTexture(); @@ -1003,6 +1007,9 @@ void testApp::keyPressed(int key){ case 'q': drawStats=!drawStats; break; + case 'm': + mirror=!mirror; + break; case 's': saveSettings("settings.xml"); break; @@ -1174,6 +1181,7 @@ void testApp::loadSettings(string filename){ cam_angle=ofToInt(XML.getAttribute("gauntlet","cam_angle","none",0)); threshold=ofToInt(XML.getAttribute("gauntlet","threshold","none",0)); diffchannel=ofToInt(XML.getAttribute("gauntlet","keyChannel","none",0)); + learningRate=ofToFloat(XML.getAttribute("gauntlet","learningRate","none",0)); if(XML.pushTag("bounds")) { for (int i=0;i<XML.getNumTags("vertex");i++){ border.push_back(ofVec2f(ofToFloat(XML.getAttribute("vertex","x","0",i)),ofToFloat(XML.getAttribute("vertex","y","0",i)))); |
