Skip to content
Newer
Older
100644 92 lines (63 sloc) 1.61 KB
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
1 #include "testApp.h"
2
3 //--------------------------------------------------------------
4 void testApp::setup(){
5
6 data = new Data();
7 gui = new Gui();
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
8 ui = new Interface();
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
9 simulator = new Simulator();
10 flowcontrol = new flowControl();
11
12 data->setup();
13 gui->setup();
14 simulator->setup(data, gui);
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
15 ui->setup(data, gui, simulator);
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
16 flowcontrol->setup();
17
18 data->getData();
19
20 ofSetVerticalSync(true);
21 ofSetSphereResolution(128);
ec5604a @mrbichel Prepared for interfacing with arduino. Started work on gui.
mrbichel authored Sep 25, 2012
22 ofBackground(50,50,50);
23 ofEnableSmoothing();
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
24 ofSetColor(255,255,255);
25 ofEnableAlphaBlending();
26
a4c99fd @mrbichel Restructured viz code.
mrbichel authored Sep 6, 2012
27 gui->loadSettings();
908a3ac @mrbichel Updated visualizer.
mrbichel authored Sep 6, 2012
28 simulator->play();
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
29 }
30
31
32 //--------------------------------------------------------------
33 void testApp::update(){
34 data->update();
35 gui->update();
36 simulator->update();
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
37 ui->update();
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
38 flowcontrol->update();
39 }
40
41 //--------------------------------------------------------------
42 void testApp::draw(){
43
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
44 ui->draw();
908a3ac @mrbichel Updated visualizer.
mrbichel authored Sep 6, 2012
45
46
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
47 data->debugDraw();
48 simulator->debugDraw();
49 flowcontrol->debugDraw();
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
50 //gui->draw();
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
51 }
52
a4c99fd @mrbichel Restructured viz code.
mrbichel authored Sep 6, 2012
53 void testApp::exit() {
54 gui->exit();
55 }
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
56
57 void testApp::keyPressed(int key){
58 gui->keyPressed(key);
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
59 ui->keyPressed(key);
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
60 }
61
62 void testApp::keyReleased(int key){
63
64 }
65
66 void testApp::mouseMoved(int x, int y){
67
68 }
69
70 void testApp::mouseDragged(int x, int y, int button){
71
72 }
73
74 void testApp::mousePressed(int x, int y, int button){
053b01e @mrbichel Interface.
mrbichel authored Sep 28, 2012
75 ui->mousePressed(x, y, button);
39acbb7 @mrbichel Added src.
mrbichel authored Sep 6, 2012
76 }
77
78 void testApp::mouseReleased(int x, int y, int button){
79
80 }
81
82 void testApp::windowResized(int w, int h){
83
84 }
85
86 void testApp::gotMessage(ofMessage msg){
87
88 }
89
90 void testApp::dragEvent(ofDragInfo dragInfo){
91
92 }
Something went wrong with that request. Please try again.