From 8c86c8e56d5948f44ba7524284824bbc6eff952b Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 12 Apr 2015 22:20:30 +0100 Subject: initial commit --- liveengine/src/viewport.h | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 liveengine/src/viewport.h (limited to 'liveengine/src/viewport.h') diff --git a/liveengine/src/viewport.h b/liveengine/src/viewport.h new file mode 100755 index 0000000..c401c17 --- /dev/null +++ b/liveengine/src/viewport.h @@ -0,0 +1,69 @@ +#ifndef VIEWPORT_H +#define VIEWPORT_H + +#include "ofxOpenNI.h" +#include "ofMain.h" +#include "playlist.h" + +#define NUM_NOTES 64 +#define START_NOTE 36 +#define NUM_CONTROLLERS 26 +#define START_CONTROLLER 102 + +#define NOTHING 0 +#define BLOCKS 1 +#define LIST 2 +#define SOLID 3 + +void bindTexture(ofBaseHasTexture &t); +void unbindTexture(ofBaseHasTexture &t); +void bindTex(ofTexture &tex); +void unbindTex(ofTexture &tex); + +#include "keyVar.h" + +class viewport +{ + public: + viewport(); + viewport(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy); + void setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy); + void draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift); + void mapdraw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift,bool drawCloud,bool drawSkel); + void setcam(map&settings); + double getSetting(const string& setting); + + ofImage testtexture; + virtual ~viewport(); + void setUG(ofxUserGenerator *_rUser); + ofFbo rb1,rb2,rb3; + float r; + bool isMapped; + + void setDefaults(); + void keyPressed(int key); + void keyReleased(int key); + + protected: + int x, y,w,h,ox,oy; + ofxUserGenerator *rUser; + private: + keyVar* vars; + + ofCamera camera; + ofNode target; + +}; + +class mappedviewport: public viewport { + public: + + mappedviewport(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy); + void setUG(ofxUserGenerator *_rUser); + void mapdraw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift); + ofxUserGenerator *rUser; + private: + +}; + +#endif // VIEWPORT_H -- cgit v1.2.3