[ODE] Consequence rotation around 2 axes - failed in result

Dmitry Medvedev pegasi at inbox.ru
Mon Aug 6 07:35:51 MST 2007


Hello.

 I need to place a cylinder geometry so that his axes of symmetry lies in XY-plane and ROTATE by some angle in XY-plane as well.
  I do the following:

      dQFromAxisAndAngle(cylQuat, 0, 0, 1, phi);
      // transform cylinder's alignment from z-axis to y-xis 
      dQFromAxisAndAngle(yQuat, 0, 1, 0, dReal(90.0f * M_PI/180.0f) );  
      dQMultiply0(cylQuat, cylQuat, cylQuat); // first rotate to place in XY-plane, then rotate in angle phi
      cylGeom->setQuaternion(cylQuat); 

Expected result was not achieved.
Did I make something wrong?

Thanks.



More information about the ODE mailing list