Skip to content
Snippets Groups Projects
Commit d37b0c04 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

bugfix

refs 930
parent 362f5c5d
No related branches found
No related tags found
No related merge requests found
......@@ -124,14 +124,14 @@ public class Mesh3DModelElementFactory {
/** Creates a material with ambient color only. */
public static Material3D material(Color3D ambient) {
Material3D m = MeshFactory.eINSTANCE.createMaterial3D();
m.setAmbient(ambient);
m.setAmbient(color(ambient.getRed(), ambient.getGreen(), ambient.getBlue()));
return m;
}
/** Creates a material with ambient and diffuse color. */
public static Material3D material(Color3D ambient, Color3D diffuse) {
Material3D m = material(ambient);
m.setDiffuse(diffuse);
m.setDiffuse(color(diffuse.getRed(), diffuse.getGreen(), diffuse.getBlue()));
return m;
}
......@@ -139,7 +139,7 @@ public class Mesh3DModelElementFactory {
public static Material3D material(Color3D ambient, Color3D diffuse, Color3D specular,
float specularCoeff) {
Material3D m = material(ambient, diffuse);
m.setSpecular(specular);
m.setSpecular(color(specular.getRed(), specular.getGreen(), specular.getBlue()));
m.setSpecularCoeff(specularCoeff);
return m;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment