Mercurial > hg > movesynth
comparison of/testApp.h @ 31:e71aad40a068
slight modification oif how the update is done. Sending osc as per tim's specification.
Have added example anubis image that we can adapt.
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Fri, 18 Feb 2011 10:17:45 +0000 |
parents | 803b8f3b70b4 |
children | f7caff1c2fa6 |
comparison
equal
deleted
inserted
replaced
19:78bf0b15093d | 31:e71aad40a068 |
---|---|
4 // uncomment this for OF 007 compatibility | 4 // uncomment this for OF 007 compatibility |
5 //#define OFX_OPENNI_BETA | 5 //#define OFX_OPENNI_BETA |
6 | 6 |
7 #include "ofMain.h" | 7 #include "ofMain.h" |
8 #include "ofxOpenNI.h" | 8 #include "ofxOpenNI.h" |
9 #include "ofxOsc.h" | |
10 | |
11 #define HOST "localhost" | |
12 #define PORT 12346 | |
9 | 13 |
10 class testApp : public ofBaseApp{ | 14 class testApp : public ofBaseApp{ |
11 | 15 |
12 public: | 16 public: |
13 void setup(); | 17 void setup(); |
14 void update(); | 18 void update(); |
15 void draw(); | 19 void draw(); |
16 | 20 |
17 void getCoordinates(ofxTrackedUser* tracked, int userID); | 21 void getCoordinates(int userID); |
22 void sendDataViaOSC(int userID); | |
18 | 23 |
19 void keyPressed (int key); | 24 void keyPressed (int key); |
20 void keyReleased(int key); | 25 void keyReleased(int key); |
21 void mouseMoved(int x, int y ); | 26 void mouseMoved(int x, int y ); |
22 void mouseDragged(int x, int y, int button); | 27 void mouseDragged(int x, int y, int button); |
26 ofxOpenNIContext context; | 31 ofxOpenNIContext context; |
27 ofxDepthGenerator depth; | 32 ofxDepthGenerator depth; |
28 ofxUserGenerator user; | 33 ofxUserGenerator user; |
29 ofxImageGenerator image; | 34 ofxImageGenerator image; |
30 //ofImage Davy; | 35 //ofImage Davy; |
36 | |
37 ofImage anubis; | |
31 bool drawIt; | 38 bool drawIt; |
32 | 39 |
33 int head[6][3];//x,y,and z of the head | 40 float torso[6][3];//x,y,and z of the head |
34 | 41 bool userPresent[6]; |
42 | |
35 ofTrueTypeFont franklinBook; | 43 ofTrueTypeFont franklinBook; |
36 string outputString; | 44 string outputString; |
45 ofxOscSender sender; | |
46 | |
47 | |
37 }; | 48 }; |
38 | 49 |
39 | 50 |
40 | 51 |
41 | 52 |
53 | |
42 #endif | 54 #endif |