Hi
I’m mot quite sure, if have missed something, or if it is supposed to be like that, or if it is a bug. I wrote a small programm to get the grip on these Odejava rotations. Why I wrote it see also http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=physics;action=display;num=1111085614
Here is the code:
Odejava.getInstance();
world = new World();
GeomBox boxG = new GeomBox(280, 60,240);
boxG.setQuaternion(new Quat4f(0,0.707f,0.707f,0));
GeomTransform t = new GeomTransform();
t.setEncapsulatedGeom(boxG);
Body b = new Body("boxBody",world);
b.addGeom(t);
b.adjustMass(1);
System.out.println("boxG: "+boxG.getQuaternion());
System.out.println("t :"+t.getQuaternion());
System.out.println("b :"+b.getQuaternion());
When I execute this code it prints these Quaternions:
boxG: (0.0, 0.7071068, 0.7071068, 0.0)
t :(NaN, NaN, NaN, NaN)
b :(0.0, 0.0, 0.0, 1.0)
Why is t = (NaN, NaN, NaN, NaN) - It doesn’t look correct, but the Box is transformed anyways … correctly.
Arne