Mercurial > hg > grouptrack
annotate src/testApp.h @ 0:2aa8ba4db20e
Initial check in.
author | samer |
---|---|
date | Sat, 21 Jan 2012 12:15:29 +0000 |
parents | |
children | 584ef20184f6 |
rev | line source |
---|---|
samer@0 | 1 #ifndef _TEST_APP |
samer@0 | 2 #define _TEST_APP |
samer@0 | 3 |
samer@0 | 4 |
samer@0 | 5 #include <ofxOsc.h> |
samer@0 | 6 #include <XnCppWrapper.h> |
samer@0 | 7 |
samer@0 | 8 #define MAX_USERS 8 |
samer@0 | 9 |
samer@0 | 10 using namespace xn; |
samer@0 | 11 |
samer@0 | 12 class UserStats; |
samer@0 | 13 class testApp : public ofBaseApp{ |
samer@0 | 14 private: |
samer@0 | 15 ofAppGlutWindow window; |
samer@0 | 16 ofxOscSender sender; |
samer@0 | 17 Context context; |
samer@0 | 18 |
samer@0 | 19 DepthGenerator depthGenerator; |
samer@0 | 20 UserGenerator userGenerator; |
samer@0 | 21 SceneAnalyzer sceneAnalyzer; |
samer@0 | 22 SceneMetaData sceneMetaData; |
samer@0 | 23 XnDepthPixel max_depth; |
samer@0 | 24 XnUInt64 timestamp; |
samer@0 | 25 XnPlane3D floor_pie; |
samer@0 | 26 ofImage userImage; |
samer@0 | 27 ofTrueTypeFont font; |
samer@0 | 28 unsigned char *imagePixels; |
samer@0 | 29 |
samer@0 | 30 int draw_image; |
samer@0 | 31 bool draw_time; |
samer@0 | 32 bool got_floor; |
samer@0 | 33 XnVector3D floor_offset; |
samer@0 | 34 |
samer@0 | 35 class UserData { |
samer@0 | 36 public: |
samer@0 | 37 bool present; |
samer@0 | 38 int plot_coors[7]; |
samer@0 | 39 }; |
samer@0 | 40 |
samer@0 | 41 UserData users[MAX_USERS]; |
samer@0 | 42 |
samer@0 | 43 void update_user(int id, UserStats& stats, UserData *user); |
samer@0 | 44 |
samer@0 | 45 public: |
samer@0 | 46 testApp(const char *host, int port, int fps); |
samer@0 | 47 ~testApp() { context.Shutdown(); }; |
samer@0 | 48 |
samer@0 | 49 void setup(); |
samer@0 | 50 void update(); |
samer@0 | 51 void draw(); |
samer@0 | 52 |
samer@0 | 53 void keyPressed (int key); |
samer@0 | 54 void keyReleased(int key); |
samer@0 | 55 void mouseMoved(int x, int y ); |
samer@0 | 56 void mouseDragged(int x, int y, int button); |
samer@0 | 57 void mousePressed(int x, int y, int button); |
samer@0 | 58 void mouseReleased(int x, int y, int button); |
samer@0 | 59 void windowResized(int w, int h); |
samer@0 | 60 }; |
samer@0 | 61 |
samer@0 | 62 #endif |