Add closeOutput for specific stream

This commit is contained in:
ButterscotchVanilla committed 2021-12-01 20:21:55 -05:00
1 parent dfeb02c1a7
commit 36907c3244
2 files changed
+10 -4

No files matched your search

@@ -156,14 +156,14 @@ public class BVHFileStream extends PoseDataStream {
}
private void writeNodeHierarchyRotation(TransformNodeWrapper node, Quaternion inverseRootRot) throws IOException {
rotBuf = node.localTransform.getRotation(rotBuf);
rotBuf = node.worldTransform.getRotation(rotBuf);
// Adjust to local rotation
if (inverseRootRot != null) {
rotBuf = node.calculateLocalRotationInverse(inverseRootRot, rotBuf);
}
// Yaw, roll, pitch
// Yaw (Z), roll (X), pitch (Y)
angleBuf = rotBuf.toAngles(angleBuf);
// Output in order of Z, X, Y
writer.write(Float.toString(angleBuf[2] * FastMath.RAD_TO_DEG) + " " + Float.toString(angleBuf[0] * FastMath.RAD_TO_DEG) + " " + Float.toString(-angleBuf[1] * FastMath.RAD_TO_DEG));