Mercurial > hg > grouptrack
view src/testApp.h @ 8:584ef20184f6
FIX: segv when too many users present - added test on user id;
increased MAX_USERS to 16; changed window title to 'Melody Triangle Tracker';
ADDED: full screen option (key 'F');
ADDED: /randinit message between /birth and /start
author | samer |
---|---|
date | Wed, 15 Feb 2012 10:55:40 +0000 |
parents | 2aa8ba4db20e |
children |
line wrap: on
line source
#ifndef _TEST_APP #define _TEST_APP #include <ofxOsc.h> #include <XnCppWrapper.h> #define MAX_USERS 16 using namespace xn; class UserStats; class testApp : public ofBaseApp{ private: ofAppGlutWindow window; ofxOscSender sender; Context context; DepthGenerator depthGenerator; UserGenerator userGenerator; SceneAnalyzer sceneAnalyzer; SceneMetaData sceneMetaData; XnDepthPixel max_depth; XnUInt64 timestamp; XnPlane3D floor_pie; ofImage userImage; ofTrueTypeFont font; unsigned char *imagePixels; int draw_image; bool draw_time; bool got_floor; XnVector3D floor_offset; class UserData { public: bool present; int plot_coors[7]; }; UserData users[MAX_USERS]; void update_user(int id, UserStats& stats, UserData *user); public: testApp(const char *host, int port, int fps); ~testApp() { context.Shutdown(); }; void setup(); void update(); void draw(); void keyPressed (int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void windowResized(int w, int h); }; #endif