samer@0: #ifndef _TEST_APP samer@0: #define _TEST_APP samer@0: samer@0: samer@0: #include samer@0: #include samer@0: samer@8: #define MAX_USERS 16 samer@0: samer@0: using namespace xn; samer@0: samer@0: class UserStats; samer@0: class testApp : public ofBaseApp{ samer@0: private: samer@0: ofAppGlutWindow window; samer@0: ofxOscSender sender; samer@0: Context context; samer@0: samer@0: DepthGenerator depthGenerator; samer@0: UserGenerator userGenerator; samer@0: SceneAnalyzer sceneAnalyzer; samer@0: SceneMetaData sceneMetaData; samer@0: XnDepthPixel max_depth; samer@0: XnUInt64 timestamp; samer@0: XnPlane3D floor_pie; samer@0: ofImage userImage; samer@0: ofTrueTypeFont font; samer@0: unsigned char *imagePixels; samer@0: samer@0: int draw_image; samer@0: bool draw_time; samer@0: bool got_floor; samer@0: XnVector3D floor_offset; samer@0: samer@0: class UserData { samer@0: public: samer@0: bool present; samer@0: int plot_coors[7]; samer@0: }; samer@0: samer@0: UserData users[MAX_USERS]; samer@0: samer@0: void update_user(int id, UserStats& stats, UserData *user); samer@0: samer@0: public: samer@0: testApp(const char *host, int port, int fps); samer@0: ~testApp() { context.Shutdown(); }; samer@0: samer@0: void setup(); samer@0: void update(); samer@0: void draw(); samer@0: samer@0: void keyPressed (int key); samer@0: void keyReleased(int key); samer@0: void mouseMoved(int x, int y ); samer@0: void mouseDragged(int x, int y, int button); samer@0: void mousePressed(int x, int y, int button); samer@0: void mouseReleased(int x, int y, int button); samer@0: void windowResized(int w, int h); samer@0: }; samer@0: samer@0: #endif