Fix key/mouse interactivity in processing 2
authorMark Slee <mcslee@gmail.com>
Fri, 7 Mar 2014 07:48:53 +0000 (23:48 -0800)
committerMark Slee <mcslee@gmail.com>
Fri, 7 Mar 2014 07:48:53 +0000 (23:48 -0800)
UIImplementation.pde
code/HeronLX.jar

index c3f08972df25f509a753d8738aab44c83f06257d..b2320c6c0a4dc4aa03bebe652b3b7f827306ac4c 100644 (file)
@@ -83,17 +83,20 @@ FloatBuffer vertData;
 
     long simulationStart = System.nanoTime();
     if (simulationOn) {
 
     long simulationStart = System.nanoTime();
     if (simulationOn) {
+      hint(DISABLE_DEPTH_TEST);
       drawSimulation(simulationColors);
       drawSimulation(simulationColors);
+      hint(ENABLE_DEPTH_TEST);
     }
     simulationNanos = System.nanoTime() - simulationStart;
     camera(); 
     strokeWeight(1);
   }
     }
     simulationNanos = System.nanoTime() - simulationStart;
     camera(); 
     strokeWeight(1);
   }
+  
   void drawSimulation(color[] simulationColors) {
     translate(0, 30, 0);
     
     fill(#141414);
   void drawSimulation(color[] simulationColors) {
     translate(0, 30, 0);
     
     fill(#141414);
-    //drawBox(0, -TRAILER_HEIGHT, 0, 0, 0, 0, TRAILER_WIDTH, TRAILER_HEIGHT, TRAILER_DEPTH, TRAILER_HEIGHT/2.);
+    drawBox(0, -TRAILER_HEIGHT, 0, 0, 0, 0, TRAILER_WIDTH, TRAILER_HEIGHT, TRAILER_DEPTH, TRAILER_HEIGHT/2.);
     fill(#070707);
     stroke(#222222);
     beginShape();
     fill(#070707);
     stroke(#222222);
     beginShape();
@@ -179,7 +182,7 @@ FloatBuffer allocateDirectFloatBuffer(int n) {
     float in = .15;
     noStroke();
     fill(#393939);  
     float in = .15;
     noStroke();
     fill(#393939);  
-    //drawBox(c.x+in, c.y+in, c.z+in, c.rx, c.ry, c.rz, Cube.EDGE_WIDTH-in*2, Cube.EDGE_HEIGHT-in*2, Cube.EDGE_WIDTH-in*2, Cube.CHANNEL_WIDTH-in);
+    drawBox(c.x+in, c.y+in, c.z+in, c.rx, c.ry, c.rz, Cube.EDGE_WIDTH-in*2, Cube.EDGE_HEIGHT-in*2, Cube.EDGE_WIDTH-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) {
   }
   
   void drawBox(float x, float y, float z, float rx, float ry, float rz, float xd, float yd, float zd, float sw) {
index 7c388a7187aa6cce3490c50164ba4cf90dbee62f..3b20d55a6b1525f7939b3d0f354dfa0f581097d6 100755 (executable)
Binary files a/code/HeronLX.jar and b/code/HeronLX.jar differ