popMatrix();
noStroke();
-// drawBassBox(glucose.model.bassBox);
-// for (Speaker s : glucose.model.speakers) {
-// drawSpeaker(s);
-// }
+ if (glucose.model.bassBox.exists) {
+ drawBassBox(glucose.model.bassBox, false);
+ }
+ for (Speaker speaker : glucose.model.speakers) {
+ drawSpeaker(speaker);
+ }
for (Cube c : glucose.model.cubes) {
drawCube(c);
}
noFill();
strokeWeight(2);
beginShape(POINTS);
- // 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);
- }
+ for (Point p : glucose.model.points) {
+ stroke(colors[p.index]);
+ vertex(p.fx, p.fy, p.fz);
}
endShape();
}
}
-void drawBassBox(BassBox b) {
+void drawBassBox(BassBox b, boolean hasSub) {
+
float in = .15;
-
- noStroke();
- fill(#191919);
- pushMatrix();
- translate(b.x + BassBox.EDGE_WIDTH/2., b.y + BassBox.EDGE_HEIGHT/2, b.z + BassBox.EDGE_DEPTH/2.);
- box(BassBox.EDGE_WIDTH-20*in, BassBox.EDGE_HEIGHT-20*in, BassBox.EDGE_DEPTH-20*in);
- popMatrix();
+
+ if (hasSub) {
+ noStroke();
+ fill(#191919);
+ pushMatrix();
+ translate(b.x + BassBox.EDGE_WIDTH/2., b.y + BassBox.EDGE_HEIGHT/2, b.z + BassBox.EDGE_DEPTH/2.);
+ box(BassBox.EDGE_WIDTH-20*in, BassBox.EDGE_HEIGHT-20*in, BassBox.EDGE_DEPTH-20*in);
+ popMatrix();
+ }
noStroke();
fill(#393939);
};
// The bass box!
- BassBox bassBox = new BassBox(BBX, 0, BBZ);
+ BassBox bassBox = BassBox.unlitBassBox(BBX, 0, BBZ); // frame exists, no lights
+ // BassBox bassBox = BassBox.noBassBox(); // no bass box at all
+ // BassBox bassBox = new BassBox(BBX, 0, BBZ); // bass box with lights
// The speakers!
List<Speaker> speakers = Arrays.asList(new Speaker[] {