rebecca@13: #ifndef _TEST_APP rebecca@13: #define _TEST_APP rebecca@13: rebecca@13: // uncomment this for OF 007 compatibility rebecca@13: //#define OFX_OPENNI_BETA rebecca@13: rebecca@13: #include "ofMain.h" rebecca@13: #include "ofxOpenNI.h" andrew@31: #include "ofxOsc.h" andrew@38: #define NUMBER_OF_USERS 6 andrew@45: #define HOST "169.254.107.152"//"localhost" andrew@38: #define PORT 12344 andrew@38: #define STOPPORT 12343 andrew@45: #define STOPHOST "localhost" andrew@45: andrew@45: #define HERESY_PORT 12346 andrew@45: #define HERESY_HOST "169.254.169.93" rebecca@13: rebecca@13: class testApp : public ofBaseApp{ rebecca@13: rebecca@13: public: rebecca@13: void setup(); rebecca@13: void update(); rebecca@13: void draw(); rebecca@13: andrew@31: void getCoordinates(int userID); andrew@31: void sendDataViaOSC(int userID); andrew@32: rebecca@13: void keyPressed (int key); rebecca@13: void keyReleased(int key); rebecca@13: void mouseMoved(int x, int y ); rebecca@13: void mouseDragged(int x, int y, int button); rebecca@13: void mousePressed(int x, int y, int button); rebecca@13: void mouseReleased(int x, int y, int button); rebecca@13: void windowResized(int w, int h); andrew@44: void bezierFunctionStuff(int i); andrew@44: void drawAcidSmiley(int userID); rebecca@13: ofxOpenNIContext context; rebecca@13: ofxDepthGenerator depth; rebecca@13: ofxUserGenerator user; rebecca@13: ofxImageGenerator image; rebecca@13: //ofImage Davy; andrew@38: void sendStopMessageForUser(int userID); andrew@45: void sendInformationToHeresy(int userID); andrew@45: void sendNoteMessageToHeresy(int noteNumber, int onOrOff, int velocity, int channel); andrew@31: andrew@31: ofImage anubis; rebecca@13: bool drawIt; andrew@38: andrew@38: float maxTorsoValues[3]; andrew@38: void checkTorsoMaxima(int id); andrew@44: int typeOfFaceToUse[NUMBER_OF_USERS]; andrew@44: double lastRecordedTime[NUMBER_OF_USERS];//x,y,and z of the head andrew@32: float torso[6][3];//x,y,and z of the head andrew@31: bool userPresent[6]; andrew@45: bool notePlayingArray[NUMBER_OF_USERS][16]; andrew@45: int pitchPlaying[NUMBER_OF_USERS]; andrew@31: andrew@45: bool nowPlaying[NUMBER_OF_USERS][16]; andrew@45: bool lastPlaying[NUMBER_OF_USERS][16]; andrew@45: andrew@45: float rightHandPosition[NUMBER_OF_USERS][3]; andrew@45: float leftHandPosition[NUMBER_OF_USERS][3]; andrew@45: double minMaxValues[NUMBER_OF_USERS][2]; andrew@17: ofTrueTypeFont franklinBook; andrew@17: string outputString; andrew@45: ofxOscSender sender, stopSender, heresySender; andrew@31: rebecca@13: }; rebecca@13: #endif