Browse Source

Made LEDs clickable... (kind of...)

hutattedonmyarm 12 years ago
parent
commit
f60789d972
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      CubeControl/Led3D.java

+ 1
- 1
CubeControl/Led3D.java View File

179
 			Primitive p = (Primitive)result.getNode(PickResult.PRIMITIVE);
179
 			Primitive p = (Primitive)result.getNode(PickResult.PRIMITIVE);
180
 			if (p != null) {
180
 			if (p != null) {
181
 				// p is now a Primitive that the user clicked
181
 				// p is now a Primitive that the user clicked
182
-				if (p.getClass().getName().equals("com.sun.j3d.utils.geometry.Cylinder")) {
182
+				if (p.getClass().getName().equals("com.sun.j3d.utils.geometry.Sphere")) {
183
 					// p is a Cylinder. Our LEDs are Spheres, so p.equals(led[x][y][z]) does not find anything...
183
 					// p is a Cylinder. Our LEDs are Spheres, so p.equals(led[x][y][z]) does not find anything...
184
 					for (int x = 0; x < 8; x++) {
184
 					for (int x = 0; x < 8; x++) {
185
 						for (int y = 0; y < 8; y++) {
185
 						for (int y = 0; y < 8; y++) {

Loading…
Cancel
Save