diff options
Diffstat (limited to 'ardor3d-extras')
-rw-r--r-- | ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3Importer.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3Importer.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3Importer.java index c86eada..5d64642 100644 --- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3Importer.java +++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3Importer.java @@ -106,16 +106,18 @@ public class Md3Importer { } // Parse out tags - final Md3Tag[] tags = new Md3Tag[header._numTags]; + final Md3Tag[][] tags = new Md3Tag[header._numFrames][header._numTags]; bis.seek(header._offsetTag); final Vector3 origin = new Vector3(); final Matrix3 axis = new Matrix3(); - for (int i = 0; i < header._numTags; i++) { - final String name = bis.readString(64); - origin.set(bis.readFloat(), bis.readFloat(), bis.readFloat()); - axis.set(bis.readFloat(), bis.readFloat(), bis.readFloat(), bis.readFloat(), bis.readFloat(), - bis.readFloat(), bis.readFloat(), bis.readFloat(), bis.readFloat()); - tags[i] = new Md3Tag(name, origin, axis); + for (int i = 0; i < header._numFrames; i++) { + for (int j = 0; j < header._numTags; j++) { + final String name = bis.readString(64).trim(); + origin.set(bis.readFloat(), bis.readFloat(), bis.readFloat()); + axis.set(bis.readFloat(), bis.readFloat(), bis.readFloat(), bis.readFloat(), bis.readFloat(), + bis.readFloat(), bis.readFloat(), bis.readFloat(), bis.readFloat()); + tags[i][j] = new Md3Tag(name, origin, axis); + } } // Parse out surfaces |