MD5 md5 = parse(stream);
SkeletalMeshDataBuilder skeletonBuilder = new SkeletalMeshDataBuilder();
List<Bone> bones = Lists.newArrayListWithCapacity(md5.numJoints);
for (int i = 0; i < md5.numJoints; ++i) {
MD5Joint joint = md5.joints[i];
Bone bone = new Bone(i, joint.name, joint.position, joint.orientation);
bones.add(bone);
if (joint.parent != -1) {
bones.get(joint.parent).addChild(bone);
}
skeletonBuilder.addBone(bone);