Mercurial > hg > movesynth
annotate 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 |
rev | line source |
---|---|
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@31 | 10 |
andrew@31 | 11 #define HOST "localhost" |
andrew@31 | 12 #define PORT 12346 |
rebecca@13 | 13 |
rebecca@13 | 14 class testApp : public ofBaseApp{ |
rebecca@13 | 15 |
rebecca@13 | 16 public: |
rebecca@13 | 17 void setup(); |
rebecca@13 | 18 void update(); |
rebecca@13 | 19 void draw(); |
rebecca@13 | 20 |
andrew@31 | 21 void getCoordinates(int userID); |
andrew@31 | 22 void sendDataViaOSC(int userID); |
andrew@17 | 23 |
rebecca@13 | 24 void keyPressed (int key); |
rebecca@13 | 25 void keyReleased(int key); |
rebecca@13 | 26 void mouseMoved(int x, int y ); |
rebecca@13 | 27 void mouseDragged(int x, int y, int button); |
rebecca@13 | 28 void mousePressed(int x, int y, int button); |
rebecca@13 | 29 void mouseReleased(int x, int y, int button); |
rebecca@13 | 30 void windowResized(int w, int h); |
rebecca@13 | 31 ofxOpenNIContext context; |
rebecca@13 | 32 ofxDepthGenerator depth; |
rebecca@13 | 33 ofxUserGenerator user; |
rebecca@13 | 34 ofxImageGenerator image; |
rebecca@13 | 35 //ofImage Davy; |
andrew@31 | 36 |
andrew@31 | 37 ofImage anubis; |
rebecca@13 | 38 bool drawIt; |
andrew@17 | 39 |
andrew@31 | 40 float torso[6][3];//x,y,and z of the head |
andrew@31 | 41 bool userPresent[6]; |
andrew@31 | 42 |
andrew@17 | 43 ofTrueTypeFont franklinBook; |
andrew@17 | 44 string outputString; |
andrew@31 | 45 ofxOscSender sender; |
andrew@31 | 46 |
andrew@31 | 47 |
rebecca@13 | 48 }; |
rebecca@13 | 49 |
andrew@17 | 50 |
andrew@17 | 51 |
andrew@17 | 52 |
andrew@31 | 53 |
rebecca@13 | 54 #endif |