* 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
This commit is contained in:
parent
e848c53ef4
commit
1ddb7903db
@ -255,6 +255,16 @@ public final class OBJLoader implements AssetLoader {
|
|||||||
v = Integer.parseInt(split[0].trim());
|
v = Integer.parseInt(split[0].trim());
|
||||||
vn = Integer.parseInt(split[2].trim());
|
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();
|
Vertex vx = new Vertex();
|
||||||
vx.v = verts.get(v - 1);
|
vx.v = verts.get(v - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user