annotate of/testApp.h @ 45:763d56955d10

taken tim's code inside the of patch
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 04 Mar 2011 13:56:53 +0000
parents b1c6e3d3a18b
children f33398343f18
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@38 10 #define NUMBER_OF_USERS 6
andrew@45 11 #define HOST "169.254.107.152"//"localhost"
andrew@38 12 #define PORT 12344
andrew@38 13 #define STOPPORT 12343
andrew@45 14 #define STOPHOST "localhost"
andrew@45 15
andrew@45 16 #define HERESY_PORT 12346
andrew@45 17 #define HERESY_HOST "169.254.169.93"
rebecca@13 18
rebecca@13 19 class testApp : public ofBaseApp{
rebecca@13 20
rebecca@13 21 public:
rebecca@13 22 void setup();
rebecca@13 23 void update();
rebecca@13 24 void draw();
rebecca@13 25
andrew@31 26 void getCoordinates(int userID);
andrew@31 27 void sendDataViaOSC(int userID);
andrew@32 28
rebecca@13 29 void keyPressed (int key);
rebecca@13 30 void keyReleased(int key);
rebecca@13 31 void mouseMoved(int x, int y );
rebecca@13 32 void mouseDragged(int x, int y, int button);
rebecca@13 33 void mousePressed(int x, int y, int button);
rebecca@13 34 void mouseReleased(int x, int y, int button);
rebecca@13 35 void windowResized(int w, int h);
andrew@44 36 void bezierFunctionStuff(int i);
andrew@44 37 void drawAcidSmiley(int userID);
rebecca@13 38 ofxOpenNIContext context;
rebecca@13 39 ofxDepthGenerator depth;
rebecca@13 40 ofxUserGenerator user;
rebecca@13 41 ofxImageGenerator image;
rebecca@13 42 //ofImage Davy;
andrew@38 43 void sendStopMessageForUser(int userID);
andrew@45 44 void sendInformationToHeresy(int userID);
andrew@45 45 void sendNoteMessageToHeresy(int noteNumber, int onOrOff, int velocity, int channel);
andrew@31 46
andrew@31 47 ofImage anubis;
rebecca@13 48 bool drawIt;
andrew@38 49
andrew@38 50 float maxTorsoValues[3];
andrew@38 51 void checkTorsoMaxima(int id);
andrew@44 52 int typeOfFaceToUse[NUMBER_OF_USERS];
andrew@44 53 double lastRecordedTime[NUMBER_OF_USERS];//x,y,and z of the head
andrew@32 54 float torso[6][3];//x,y,and z of the head
andrew@31 55 bool userPresent[6];
andrew@45 56 bool notePlayingArray[NUMBER_OF_USERS][16];
andrew@45 57 int pitchPlaying[NUMBER_OF_USERS];
andrew@31 58
andrew@45 59 bool nowPlaying[NUMBER_OF_USERS][16];
andrew@45 60 bool lastPlaying[NUMBER_OF_USERS][16];
andrew@45 61
andrew@45 62 float rightHandPosition[NUMBER_OF_USERS][3];
andrew@45 63 float leftHandPosition[NUMBER_OF_USERS][3];
andrew@45 64 double minMaxValues[NUMBER_OF_USERS][2];
andrew@17 65 ofTrueTypeFont franklinBook;
andrew@17 66 string outputString;
andrew@45 67 ofxOscSender sender, stopSender, heresySender;
andrew@31 68
rebecca@13 69 };
rebecca@13 70 #endif