[vtkusers] vtkAssembly : restore postion and rotation stored in quaterion ?

agerlach agerlach at gmail.com
Mon Jan 23 15:14:11 EST 2012


I have a function that converts quaternions to euler axis rotation and our
math is a little different. I know there are more then one ways to do the
conversion but I know mine works so using your notation:

double angle = 2. * acos(qw);
double ax = 1./sin(angle/2.)*qx;
double ay = 1./sin(angle/2.)*qy;
double az = 1./sin(angle/2.)*qz;

assembly->RotateWXYZ(360 - vtkMath::DegreesFromRadian(angle), ax, ay, az)

This is from "Aircraft control and simulation" by Stevens

I hope this helps.



--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkAssembly-restore-postion-and-rotation-stored-in-quaterion-tp5141577p5169608.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list