1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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<string,string>&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
|