use of org.rajawali3d.animation.mesh.SkeletalAnimationFrame in project Rajawali by Rajawali.
the class LoaderMD5Anim method parseBounds.
private void parseBounds(SkeletalAnimationFrame[] frames, BufferedReader buffer) {
try {
String line;
int index = 0;
while ((line = buffer.readLine()) != null) {
StringTokenizer parts = new StringTokenizer(line, " ");
int numTokens = parts.countTokens();
if (line.indexOf('}') > -1)
return;
if (numTokens == 0)
continue;
SkeletalAnimationFrame frame = new SkeletalAnimationFrame();
frames[index++] = frame;
// discard (
parts.nextToken();
Vector3 min = new Vector3(Float.parseFloat(parts.nextToken()), Float.parseFloat(parts.nextToken()), Float.parseFloat(parts.nextToken()));
// discard )
parts.nextToken();
// discard (
parts.nextToken();
Vector3 max = new Vector3(Float.parseFloat(parts.nextToken()), Float.parseFloat(parts.nextToken()), Float.parseFloat(parts.nextToken()));
frame.setBounds(min, max);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations