Is there any workaround for the test code below. I would like to get the same rotation values out as I put in:
import javax.media.j3d.*;
import javax.vecmath.*;
public class RotationTest {
public RotationTest() {
}
public static void main(String[] args) {
Transform3D t= new Transform3D();
Matrix3d rotationScale = new Matrix3d();
AxisAngle4d rotation = new AxisAngle4d(0, -1, 0, Math.PI/2);
System.out.println(rotation);
t.set(new Vector3d(10,0,10));
t.setRotation(rotation);
t.setScale(0.5d);
t.getRotationScale(rotationScale);
rotation.set(rotationScale);
System.out.println(rotation);
}
}
Test result:
(0.0, -1.0, 0.0, 1.5707963267948966)
(0.0, -1.0, 0.0, 2.0344438552856445)