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

more OBJ bugs fixed

refs 930
parent ec1ef816
No related branches found
No related tags found
No related merge requests found
......@@ -114,7 +114,8 @@ public class Mesh3DModelElementFactory {
public static MaterialGroup3D materialGroup(Material3D m, List<Face3D> faces,
boolean smoothShading) {
MaterialGroup3D group = MeshFactory.eINSTANCE.createMaterialGroup3D();
group.setMaterial(m);
group.setMaterial(material(m.getAmbient(), m.getDiffuse(), m.getSpecular(),
m.getSpecularCoeff()));
group.setSmoothShading(smoothShading);
group.getFacesList().addAll(faces);
return group;
......
......@@ -127,6 +127,7 @@ public class OBJLoaderUtil {
smoothShading = true;
}
} else if(line.startsWith("o ")) { // next object
addMaterialGroup();
addObject(objectData);
objectName = line.split(" ")[1];
} else if(line.startsWith("usemtl ")) { // use material
......
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