boolean pandaBoardsEnabled = false;
boolean debugMode = false;
+DebugUI debugUI;
// Camera variables
float eyeR, eyeA, eyeX, eyeY, eyeZ, midX, midY, midZ;
// Build overlay UI
ui = controlUI = new ControlUI();
mappingUI = new MappingUI(mappingTool);
+ debugUI = new DebugUI(frontChannels, rearChannels);
logTime("Built overlay UI");
// MIDI devices
}
SCMidiDevices.initializeStandardDevices(glucose);
logTime("Setup MIDI devices");
-
+
// Setup camera
midX = glucose.model.xMax/2 + 20;
midY = glucose.model.yMax/2;
// Draws the simulation and the 2D UI overlay
background(40);
color[] colors = glucose.getColors();
+ if (debugMode) {
+ debugUI.maskColors(colors);
+ }
+
camera(
eyeX, eyeY, eyeZ,
midX, midY, midZ,
);
stroke(#333333);
fill(#292929);
- float yFloor = -3;
+ float yFloor = -2;
beginShape();
vertex(0, yFloor, 0);
vertex(glucose.model.xMax, yFloor, 0);
for (Point p : glucose.model.points) {
stroke(colors[p.index]);
vertex(p.fx, p.fy, p.fz);
+ // println(p.fx + ":" + p.fy + ":" + p.fz);
}
endShape();
strokeWeight(1);
drawUI();
+ if (debugMode) {
+ debugUI.draw();
+ }
+
// TODO(mcslee): move into GLucose engine
if (pandaBoardsEnabled) {
pandaFront.send(colors);
case 'd':
debugMode = !debugMode;
println("Debug output: " + (debugMode ? "ON" : "OFF"));
+ break;
case 'm':
mappingMode = !mappingMode;
if (mappingMode) {
if (mouseX > ui.leftPos) {
ui.mousePressed();
} else {
+ if (debugMode) {
+ debugUI.mousePressed();
+ }
mx = mouseX;
my = mouseY;
}