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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
#pragma once
//#include <GL/glxew.h>
#include "ofMain.h"
#include "ofxXmlSettings.h"
#define OF_ADDON_USING_OFXMIDIIN
#include "ofxMidi.h"
#include "ofxFensterManager.h"
#include "ofxGui.h"
#include "viewport.h"
class previewWindow;
class guiWindow;
class kinectWindow;
class testApp : public ofxFensterListener, public ofxMidiListener{
public:
void setup();
void update();
void draw();
void keyPressed(int key, ofxFenster* win);
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void gotMessage(ofMessage msg);
void dragEvent(ofDragInfo dragInfo);
void dragEvent(ofDragInfo dragInfo,ofxFenster* win);
void saveSettings(string filename);
void mousePressedEvent(ofMouseEventArgs &args);
void keyPressedEvent(ofKeyEventArgs &args);
void windowEvent(ofResizeEventArgs &args);
void makeColours();
void toggleFPS();
bool showFPS;
ofxXmlSettings XML;
bool fullscreenoutput;
viewport vp1,vp2;
vector<viewport*> viewports;
int activeView;
previewWindow *prevWin;
guiWindow *guiWin;
kinectWindow *kinectWin;
ofxFenster* win;
int midiChannel;
ofxMidiIn midiIn;
void newMidiMessage(ofxMidiEventArgs& eventArgs);
ofxPanel gui;
/*
ofxToggle reversemain;
ofxToggle controlColours;
ofxToggle noteRandomiseColours;
ofxToggle transparentBlack;
ofxButton resetDrawscale;
ofxButton resetFBscale;
ofxToggle drawCloud;
*/
ofxIntSlider fadectl;
ofxParameter<int> fade;
ofxFloatSlider decimatectl;
ofxParameter<float> decimate;
ofxFloatSlider featurectl;
ofxParameter<float> featuresize;
//a radio button. sigh.
int drawMode;
ofxToggle pointsMode;
ofxToggle linesMode;
ofxToggle polysMode;
void pointsModeSet(bool & set);
void linesModeSet(bool & set);
void polysModeSet(bool & set);
ofxToggle logo;
//void logoSet(bool & set);
ofxToggle add;
ofxToggle usecolour;
ofxFloatSlider rangectl;
ofxParameter<float> range;
ofxFloatSlider xrotctl;
ofxParameter<float> xrot;
ofxFloatSlider yrotctl;
ofxParameter<float> yrot;
ofxFloatSlider zrotctl;
ofxParameter<float> zrot;
ofxButton resetDrawscale;
ofxButton resetFBscale;
ofxButton resetSlide;
void resetDrawscalePressed(bool & pressed);
void resetFBscalePressed(bool & pressed);
void resetSlidePressed(bool & pressed);
//kinect stuff
bool useKinect;
ofxKinect kinect;
};
class kinectWindow: public ofxFensterListener{
public:
~kinectWindow();
testApp *parent;
void setup();
void setParent(testApp *p);
void draw();
void mousePressed( int x, int y, int button );
};
class previewWindow: public ofxFensterListener{
public:
~previewWindow();
ofFbo *rb;
void setup();
void setBuffer(ofFbo *buffer);
void draw();
};
class guiWindow: public ofxFensterListener{
public:
~guiWindow();
testApp *parent;
void setup();
void setParent(testApp *p);
void draw();
void mouseMoved(int x, int y, ofxFenster* f) {};
void mouseMoved(int x, int y) {};
void mouseDragged(int x, int y, int button, ofxFenster* f) {};
void mouseDragged(int x, int y, int button) {};
void mousePressed(int x, int y, int btn, ofxFenster* f) {};
void mousePressed(int x, int y, int btn) {};
void mouseReleased(int x, int y, int btn, ofxFenster* f) {};
void mouseReleased(int x, int y, int btn) {};
void mouseReleased() {};
void dragEvent(ofDragInfo dragInfo,ofxFenster* win);
void windowMoved(int x, int y);
};
|