rebecca@13
|
1 #ifndef _TEST_APP
|
rebecca@13
|
2 #define _TEST_APP
|
rebecca@13
|
3
|
rebecca@13
|
4 // uncomment this for OF 007 compatibility
|
rebecca@13
|
5 //#define OFX_OPENNI_BETA
|
rebecca@13
|
6
|
rebecca@13
|
7 #include "ofMain.h"
|
rebecca@13
|
8 #include "ofxOpenNI.h"
|
andrew@31
|
9 #include "ofxOsc.h"
|
andrew@38
|
10 #define NUMBER_OF_USERS 6
|
andrew@31
|
11 #define HOST "localhost"
|
andrew@38
|
12 #define PORT 12344
|
andrew@38
|
13 #define STOPPORT 12343
|
rebecca@13
|
14
|
rebecca@13
|
15 class testApp : public ofBaseApp{
|
rebecca@13
|
16
|
rebecca@13
|
17 public:
|
rebecca@13
|
18 void setup();
|
rebecca@13
|
19 void update();
|
rebecca@13
|
20 void draw();
|
rebecca@13
|
21
|
andrew@31
|
22 void getCoordinates(int userID);
|
andrew@31
|
23 void sendDataViaOSC(int userID);
|
andrew@32
|
24
|
rebecca@13
|
25 void keyPressed (int key);
|
rebecca@13
|
26 void keyReleased(int key);
|
rebecca@13
|
27 void mouseMoved(int x, int y );
|
rebecca@13
|
28 void mouseDragged(int x, int y, int button);
|
rebecca@13
|
29 void mousePressed(int x, int y, int button);
|
rebecca@13
|
30 void mouseReleased(int x, int y, int button);
|
rebecca@13
|
31 void windowResized(int w, int h);
|
rebecca@13
|
32 ofxOpenNIContext context;
|
rebecca@13
|
33 ofxDepthGenerator depth;
|
rebecca@13
|
34 ofxUserGenerator user;
|
rebecca@13
|
35 ofxImageGenerator image;
|
rebecca@13
|
36 //ofImage Davy;
|
andrew@38
|
37 void sendStopMessageForUser(int userID);
|
andrew@31
|
38
|
andrew@31
|
39 ofImage anubis;
|
rebecca@13
|
40 bool drawIt;
|
andrew@38
|
41
|
andrew@38
|
42 float maxTorsoValues[3];
|
andrew@38
|
43 void checkTorsoMaxima(int id);
|
andrew@17
|
44
|
andrew@38
|
45 double lastRecordedTime[6];//x,y,and z of the head
|
andrew@32
|
46 float torso[6][3];//x,y,and z of the head
|
andrew@31
|
47 bool userPresent[6];
|
andrew@31
|
48
|
andrew@17
|
49 ofTrueTypeFont franklinBook;
|
andrew@17
|
50 string outputString;
|
andrew@38
|
51 ofxOscSender sender, stopSender;
|
andrew@31
|
52
|
rebecca@13
|
53 };
|
rebecca@13
|
54 #endif
|