|
@@ -55,12 +55,7 @@ class Led3D {
|
55
|
55
|
private Vector3d lookVect = new Vector3d(1.0, 1.0, 0.0);
|
56
|
56
|
|
57
|
57
|
Led3D(Canvas3D canv) {
|
58
|
|
-
|
59
|
|
- //Material
|
60
|
|
-
|
61
|
58
|
|
62
|
|
-
|
63
|
|
-
|
64
|
59
|
canvas = canv;
|
65
|
60
|
group = new BranchGroup();
|
66
|
61
|
// Position viewer, so we are looking at object
|
|
@@ -109,16 +104,11 @@ class Led3D {
|
109
|
104
|
for (int y = 0; y < 8; y++) {
|
110
|
105
|
for (int z = 0; z < 8; z++) {
|
111
|
106
|
leds[x][y][z] = new Sphere(0.05f);
|
|
107
|
+ Appearance a = new Appearance();
|
|
108
|
+ a.setMaterial(whiteMat);
|
|
109
|
+ leds[x][y][z].setAppearance(a);
|
112
|
110
|
if ((x == 7) && (y == 7) && (z == 7)) {
|
113
|
|
- Appearance a = new Appearance();
|
114
|
|
- a.setMaterial(redMat);
|
115
|
|
- //a.setColoringAttributes(colorRed);
|
116
|
|
- leds[x][y][z].setAppearance(a);
|
117
|
|
- } else {
|
118
|
|
- Appearance a = new Appearance();
|
119
|
|
- a.setMaterial(whiteMat);
|
120
|
|
- //a.setColoringAttributes(colorRed);
|
121
|
|
- leds[x][y][z].setAppearance(a);
|
|
111
|
+ a.setMaterial(redMat);
|
122
|
112
|
}
|
123
|
113
|
TransformGroup tg = new TransformGroup();
|
124
|
114
|
tg.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);
|