/** * @param face * the new color material face * @throws IllegalArgumentException * if face is null */ public void setColorMaterialFace(final MaterialFace face) { if (face == null) { throw new IllegalArgumentException("face can not be null."); } _colorMaterialFace = face; setNeedsRefresh(true); }
/** * @param material * the new color material mode * @throws IllegalArgumentException * if material is null */ public void setColorMaterial(final ColorMaterial material) { if (material == null) { throw new IllegalArgumentException("material can not be null."); } _colorMaterial = material; setNeedsRefresh(true); }
/** * @param face * the face to apply the shininess color to * @param shininess * the new shininess for this material. Must be between 0 and 128. Higher numbers result in "tighter" * specular reflections. */ public void setShininess(final MaterialFace face, final float shininess) { if (shininess < 0 || shininess > 128) { throw new IllegalArgumentException("Shininess must be between 0 and 128."); } if (face == MaterialFace.Front || face == MaterialFace.FrontAndBack) { _frontShininess = shininess; } if (face == MaterialFace.Back || face == MaterialFace.FrontAndBack) { _backShininess = shininess; } setNeedsRefresh(true); }
/** * @param face * the face to apply the ambient color to * @param ambient * the new ambient color */ public void setAmbient(final MaterialFace face, final ReadOnlyColorRGBA ambient) { if (face == MaterialFace.Front || face == MaterialFace.FrontAndBack) { _frontAmbient.set(ambient); } if (face == MaterialFace.Back || face == MaterialFace.FrontAndBack) { _backAmbient.set(ambient); } setNeedsRefresh(true); }
/** * @param face * the face to apply the specular color to * @param specular * the new specular color */ public void setSpecular(final MaterialFace face, final ReadOnlyColorRGBA specular) { if (face == MaterialFace.Front || face == MaterialFace.FrontAndBack) { _frontSpecular.set(specular); } if (face == MaterialFace.Back || face == MaterialFace.FrontAndBack) { _backSpecular.set(specular); } setNeedsRefresh(true); }
/** * @param face * the face to apply the diffuse color to * @param diffuse * the new diffuse color */ public void setDiffuse(final MaterialFace face, final ReadOnlyColorRGBA diffuse) { if (face == MaterialFace.Front || face == MaterialFace.FrontAndBack) { _frontDiffuse.set(diffuse); } if (face == MaterialFace.Back || face == MaterialFace.FrontAndBack) { _backDiffuse.set(diffuse); } setNeedsRefresh(true); }
/** * @param face * the face to apply the emissive color to * @param emissive * the new emissive color */ public void setEmissive(final MaterialFace face, final ReadOnlyColorRGBA emissive) { if (face == MaterialFace.Front || face == MaterialFace.FrontAndBack) { _frontEmissive.set(emissive); } if (face == MaterialFace.Back || face == MaterialFace.FrontAndBack) { _backEmissive.set(emissive); } setNeedsRefresh(true); }