Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed legs

  • Loading branch information...
commit 39ff79358e02a22e2a7c6170ba41a74aaad5e283 1 parent c7eec18
unknown authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 CubeControl/Led3D.java
View
10 CubeControl/Led3D.java
@@ -145,9 +145,9 @@ public Led3D(Canvas3D canv, Frame f) {
}
}
// 8 times, use x as y
- drawLedFeetHorizontal(-3.5, (double) x-4, 3.5, 7.0f, 0.02f, 90);
- drawLedFeetHorizontal(2.5, (double) x-4, 3.5, 7.0f, 0.02f, 90);
- drawLedFeetHorizontal(-1.5, (double) x-4, 3.5, 7.0f, 0.02f, 90);
+ for(int i = 0; i > -8; i--){
+ drawLedFeetHorizontal(i+3, (double) x-4, -0.5, 7.0f, 0.02f, 90);
+ }
}
// Add an ambient light
@@ -191,12 +191,16 @@ public void mouseClicked(MouseEvent e) {
break;
} else if ((x == 7) && (y == 7) && (z == 7)) {
System.out.println("Clicked, but LED not found!");
+
}
}
}
}
} else {
System.out.println("Clicked, but not a sphere. Clicked object: " + p.getClass().getName());
+ if(p.getClass().getName().equals("com.sun.j3d.utils.geometry.Cylinder")){
+
+ }
}
}
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.