New Heron and GLucose jars, bring bass box back
[SugarCubes.git] / _Internals.pde
index a358f1b3202a94fd15c104314d51500a0ddcce80..5035ed59b6f8aeef7f4c7f232466929222924211 100644 (file)
@@ -124,6 +124,7 @@ void setup() {
   println("Hit the 'p' key to toggle Panda Board output");
 }
 
+
 void controllerChangeReceived(rwmidi.Controller cc) {
   if (debugMode) {
     println("CC: " + cc.toString());
@@ -175,10 +176,10 @@ void draw() {
   endShape();
   
   noStroke();
-  drawBassBox(glucose.model.bassBox);
-  for (Speaker s : glucose.model.speakers) {
-    drawSpeaker(s);
-  }
+//  drawBassBox(glucose.model.bassBox);
+//  for (Speaker s : glucose.model.speakers) {
+//    drawSpeaker(s);
+//  }
   for (Cube c : glucose.model.cubes) {
     drawCube(c);
   }
@@ -186,9 +187,13 @@ void draw() {
   noFill();
   strokeWeight(2);
   beginShape(POINTS);
-  for (Point p : glucose.model.points) {
-    stroke(colors[p.index]);
-    vertex(p.fx, p.fy, p.fz);
+  // TODO(mcslee): restore when bassBox/speakers are right again
+  // for (Point p : glucose.model.points) {
+  for (Cube cube : glucose.model.cubes) {
+    for (Point p : cube.points) {
+      stroke(colors[p.index]);
+      vertex(p.fx, p.fy, p.fz);
+    }
   }
   endShape();
   
@@ -293,8 +298,7 @@ void drawSpeaker(Speaker s) {
   noStroke();
   fill(#393939);  
   drawBox(s.x+in, s.y+in, s.z+in, 0, s.ry, 0, Speaker.EDGE_WIDTH-in*2, Speaker.EDGE_HEIGHT-in*2, Speaker.EDGE_DEPTH-in*2, Cube.CHANNEL_WIDTH-in);
-}  
-
+}
 
 void drawBox(float x, float y, float z, float rx, float ry, float rz, float xd, float yd, float zd, float sw) {
   pushMatrix();
@@ -335,16 +339,22 @@ void drawUI() {
     ui.drawHelpTip();
   }
   ui.drawFPS();
+  ui.drawDanText();
 }
 
 boolean uiOn = true;
 int restoreToIndex = -1;
 
+boolean doDual = false;
+
 void keyPressed() {
   if (mappingMode) {
     mappingTool.keyPressed();
   }
   switch (key) {
+    case 'w':
+       doDual = !doDual;
+       break;
     case '-':
     case '_':
       frameRate(--targetFramerate);
@@ -426,4 +436,3 @@ void mouseWheel(int delta) {
     eyeZ = midZ + eyeR*cos(eyeA);
   }
 }
-