} else {
// Set default color if it doesn't exist yet
Color3f black = new Color3f();
if (appearance.getMaterial() == null) {
appearance.setMaterial(new Material(black, black, black, black, 1));
appearance.setColoringAttributes(new ColoringAttributes(black, ColoringAttributes.SHADE_GOURAUD));
}
}
this.transparentColor = null;
this.transparency = null;
this.inPhongBlinnOrLambert = false;
this.inConstant = false;
} else if (this.inConstant || this.inPhongBlinnOrLambert) {
// Set appearance attributes
if ("color".equals(name)) {
if ("emission".equals(parent)) {
if (this.inPhongBlinnOrLambert) {
getAppearanceMaterial(this.effectId).setEmissiveColor(
this.floats [0], this.floats [1], this.floats [2]);
} else { // inConstant
this.effectAppearances.get(this.effectId).setColoringAttributes(new ColoringAttributes(
this.floats [0], this.floats [1], this.floats [2], ColoringAttributes.SHADE_GOURAUD));
}
} else if ("ambient".equals(parent)) {
getAppearanceMaterial(this.effectId).setAmbientColor(
this.floats [0], this.floats [1], this.floats [2]);
} else if ("diffuse".equals(parent)) {
getAppearanceMaterial(this.effectId).setDiffuseColor(
this.floats [0], this.floats [1], this.floats [2], this.floats [3]);
// Always set coloring attributes in case geometries don't contain normals
this.effectAppearances.get(this.effectId).setColoringAttributes(new ColoringAttributes(
this.floats [0], this.floats [1], this.floats [2], ColoringAttributes.SHADE_GOURAUD));
} else if ("specular".equals(parent)) {
getAppearanceMaterial(this.effectId).setSpecularColor(
this.floats [0], this.floats [1], this.floats [2]);
} else if ("transparent".equals(parent)) {