* OBJ loader now supports loading models that use negative indices in the face statement

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9724 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent e848c53ef4
commit 1ddb7903db
  1. 10
      engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java

@ -256,6 +256,16 @@ public final class OBJLoader implements AssetLoader {
vn = Integer.parseInt(split[2].trim());
}
if (v < 0) {
v = verts.size() + v + 1;
}
if (vt < 0) {
vt = texCoords.size() + vt + 1;
}
if (vn < 0) {
vn = norms.size() + vn + 1;
}
Vertex vx = new Vertex();
vx.v = verts.get(v - 1);

Loading…
Cancel
Save