Use helpers from new GLucose for points per cube
[SugarCubes.git] / _Internals.pde
index 8b9163d5068b402f9b28d02f534b3e4e3614ceec..d51463c7c070373c6167decca7d2fa6bc927a1d6 100644 (file)
@@ -95,10 +95,9 @@ void setup() {
   // Build output driver
   int[][] frontChannels = glucose.mapping.buildFrontChannelList();
   int[][] rearChannels = glucose.mapping.buildRearChannelList();
-  int[][] flippedRGB = glucose.mapping.buildFlippedRGBList();
   mappingTool = new MappingTool(glucose, frontChannels, rearChannels);
-  pandaFront = new PandaDriver(new NetAddress("192.168.1.28", 9001), glucose.model, frontChannels, flippedRGB);
-  pandaRear = new PandaDriver(new NetAddress("192.168.1.29", 9001), glucose.model, rearChannels, flippedRGB);
+  pandaFront = new PandaDriver(new NetAddress("10.200.1.28", 9001), glucose.model, frontChannels);
+  pandaRear = new PandaDriver(new NetAddress("10.200.1.29", 9001), glucose.model, rearChannels);
   logTime("Build PandaDriver");
   
   // Build overlay UI
@@ -214,7 +213,7 @@ void draw() {
   
   // TODO(mcslee): move into GLucose engine
   if (pandaBoardsEnabled) {
-    pandaFront.send(colors);
+    // pandaFront.send(colors);
     pandaRear.send(colors);
   }
 }
@@ -349,8 +348,12 @@ void mouseReleased() {
 }
  
 void mouseWheel(int delta) {
-  eyeR = constrain(eyeR - delta, -500, -80);
-  eyeX = midX + eyeR*sin(eyeA);
-  eyeZ = midZ + eyeR*cos(eyeA);
+  if (mouseX > ui.leftPos) {
+    ui.mouseWheel(delta);
+  } else {
+    eyeR = constrain(eyeR - delta, -500, -80);
+    eyeX = midX + eyeR*sin(eyeA);
+    eyeZ = midZ + eyeR*cos(eyeA);
+  }
 }