comparison src/testApp.h @ 0:2aa8ba4db20e

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