|
@@ -145,9 +145,9 @@ public class Led3D extends MouseAdapter {
|
145
|
145
|
}
|
146
|
146
|
}
|
147
|
147
|
// 8 times, use x as y
|
148
|
|
- drawLedFeetHorizontal(-3.5, (double) x-4, 3.5, 7.0f, 0.02f, 90);
|
149
|
|
- drawLedFeetHorizontal(2.5, (double) x-4, 3.5, 7.0f, 0.02f, 90);
|
150
|
|
- drawLedFeetHorizontal(-1.5, (double) x-4, 3.5, 7.0f, 0.02f, 90);
|
|
148
|
+ for(int i = 0; i > -8; i--){
|
|
149
|
+ drawLedFeetHorizontal(i+3, (double) x-4, -0.5, 7.0f, 0.02f, 90);
|
|
150
|
+ }
|
151
|
151
|
}
|
152
|
152
|
|
153
|
153
|
// Add an ambient light
|
|
@@ -191,12 +191,16 @@ public class Led3D extends MouseAdapter {
|
191
|
191
|
break;
|
192
|
192
|
} else if ((x == 7) && (y == 7) && (z == 7)) {
|
193
|
193
|
System.out.println("Clicked, but LED not found!");
|
|
194
|
+
|
194
|
195
|
}
|
195
|
196
|
}
|
196
|
197
|
}
|
197
|
198
|
}
|
198
|
199
|
} else {
|
199
|
200
|
System.out.println("Clicked, but not a sphere. Clicked object: " + p.getClass().getName());
|
|
201
|
+ if(p.getClass().getName().equals("com.sun.j3d.utils.geometry.Cylinder")){
|
|
202
|
+
|
|
203
|
+ }
|
200
|
204
|
}
|
201
|
205
|
}
|
202
|
206
|
} else {
|