diff src/testApp.h @ 0:2aa8ba4db20e

Initial check in.
author samer
date Sat, 21 Jan 2012 12:15:29 +0000
parents
children 584ef20184f6
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/testApp.h	Sat Jan 21 12:15:29 2012 +0000
@@ -0,0 +1,62 @@
+#ifndef _TEST_APP
+#define _TEST_APP
+
+
+#include <ofxOsc.h>
+#include <XnCppWrapper.h>
+
+#define MAX_USERS 8
+
+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