[ODE] Quaternion/Rotation problem?

Sean Cullen Sean.Cullen at lmco.com
Wed Apr 24 09:27:01 2002


Looks to me like you got back the exact same quaternion.  Its just that
your printf is rounding the values to 3 decimal places.



q[1] = 0.00074993; q[2] = 0.000499856; q[3] = 0.000499856; q[0] = 
0.999999; // x,y,z,w
  dBodySetQuaternion(bodyID, q);
  const dReal* R = dBodyGetRotation(bodyID);
  dBodySetRotation(bodyID, R);
  const dReal* oq = dBodyGetQuaternion(bodyID);
  printf("Got back %5.3f %5.3f %5.3f %5.3f\n",oq[1],oq[2],oq[3],oq[0]);

-------------------------------------------------------
Sean S Cullen                      Phone:(781)505-9522
email:scullen@lads.is.lmco.com     Fax:  (781)505-9501/9502
 
Lockheed Martin ADS
164 Middlesex Turnpike
Burlington, MA 01803