[vtkusers] Relative Rotation with VTK Transform

Lonni Besançon lonni.besancon at gmail.com
Wed Feb 17 03:58:50 EST 2016


Hello David, thanks for answering and thanks for your time.

For the elements of rotations, this is what I get from google in their
documentation.
/Orientation, as a quaternion, of the pose of the target frame with
reference to to the base frame.
Specified as (x,y,z,w) where RotationAngle is in radians:

 x = RotationAxis.x * sin(RotationAngle / 2)
 y = RotationAxis.y * sin(RotationAngle / 2)
 z = RotationAxis.z * sin(RotationAngle / 2)
 w = cos(RotationAngle / 2)/

So the rotation I use is this one. It is from a special kind of tablet and
special sensors.
Therefore rotation[3] is my w, and since the coordinate system is not the
same, I had to switch the axis parts of rotation.
I think the basic operations that I do with rotation and RotateWXYZ are ok,
because if I always go back to my original position, all the rotations are
correctly mapped to my actor. However, combining rotations is what triggers
weird and unexpected rotation (i.e not on the correct axis).

Thanks for the tip on the memory leak, and thanks again for your time.

Lonni



--
View this message in context: http://vtk.1045678.n5.nabble.com/Relative-Rotation-with-VTK-Transform-tp5736566p5736607.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list