From 0363ee4f188c735a43c6624a2b10a191f74c3029 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 1 Apr 2012 23:07:39 +0100 Subject: nearly working trap door --- gaunt01/src/testApp.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'gaunt01/src/testApp.h') diff --git a/gaunt01/src/testApp.h b/gaunt01/src/testApp.h index b08682c..2870008 100644 --- a/gaunt01/src/testApp.h +++ b/gaunt01/src/testApp.h @@ -12,6 +12,10 @@ //#define _USE_LIVE_VIDEO // uncomment this to use a live camera // otherwise, we'll use a movie file +#define PLAY 0 +#define CALIBRATE 1 + + class testApp : public ofBaseApp{ public: @@ -29,15 +33,20 @@ class testApp : public ofBaseApp{ void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); + int mode; + + ofVec2f screen2plane(ofVec2f screenpos); + ofVec3f plane2world(ofVec2f planepos); + void updatePlane(); + ofxXmlSettings XML; void loadSettings(string filename); void saveSettings(string filename); - #ifdef _USE_LIVE_VIDEO - ofVideoGrabber vidGrabber; - #else - ofVideoPlayer vidPlayer; - #endif + bool useCamera; + bool hasCamera; + ofVideoGrabber vidGrabber; + ofVideoPlayer vidPlayer; ofxCvColorImage colorImg; @@ -58,10 +67,11 @@ class testApp : public ofBaseApp{ ofPlane plane; ofProjector projector; - ofVec3f pos; + ofVec2f pos; vector players; trapdoor trapDoor; + ofMesh ground; }; -- cgit v1.2.3