|
|
@ -194,12 +194,7 @@ public class MeshHelper extends AbstractBlenderHelper { |
|
|
|
int v3 = ((Number) mFace.getFieldValue("v3")).intValue(); |
|
|
|
int v3 = ((Number) mFace.getFieldValue("v3")).intValue(); |
|
|
|
int v4 = ((Number) mFace.getFieldValue("v4")).intValue(); |
|
|
|
int v4 = ((Number) mFace.getFieldValue("v4")).intValue(); |
|
|
|
|
|
|
|
|
|
|
|
Vector3f n; |
|
|
|
Vector3f n = FastMath.computeNormal(vertices[v1], vertices[v2], vertices[v3]); |
|
|
|
if(fixUpAxis) { |
|
|
|
|
|
|
|
n = FastMath.computeNormal(vertices[v1], vertices[v3], vertices[v2]); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
n = FastMath.computeNormal(vertices[v1], vertices[v2], vertices[v3]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.addNormal(n, normalMap, smooth, vertices[v1], vertices[v2], vertices[v3]); |
|
|
|
this.addNormal(n, normalMap, smooth, vertices[v1], vertices[v2], vertices[v3]); |
|
|
|
normalList.add(normalMap.get(vertices[v1])); |
|
|
|
normalList.add(normalMap.get(vertices[v1])); |
|
|
|
normalList.add(normalMap.get(vertices[v2])); |
|
|
|
normalList.add(normalMap.get(vertices[v2])); |
|
|
@ -506,7 +501,7 @@ public class MeshHelper extends AbstractBlenderHelper { |
|
|
|
if(this.fixUpAxis) { |
|
|
|
if(this.fixUpAxis) { |
|
|
|
for (int i = 0; i < verticesAmount; ++i) { |
|
|
|
for (int i = 0; i < verticesAmount; ++i) { |
|
|
|
DynamicArray<Number> coordinates = (DynamicArray<Number>) mVerts.get(i).getFieldValue("co"); |
|
|
|
DynamicArray<Number> coordinates = (DynamicArray<Number>) mVerts.get(i).getFieldValue("co"); |
|
|
|
vertices[i] = new Vector3f(coordinates.get(0).floatValue(), coordinates.get(2).floatValue(), coordinates.get(1).floatValue()); |
|
|
|
vertices[i] = new Vector3f(coordinates.get(0).floatValue(), coordinates.get(2).floatValue(), -coordinates.get(1).floatValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
for (int i = 0; i < verticesAmount; ++i) { |
|
|
|
for (int i = 0; i < verticesAmount; ++i) { |
|
|
|