Hi,
I have the following situations. I get rotations in form of quaternions from a
system, with a pre-defined coordinate system. These rotations are used to
transform the view matrix later on.
However, the difference of coordinate systems, conversion from quaternion to
euler, matrix, etc. and the multiplication orders are giving me a headache.
Bsaically what I have now is something like:
Code:
osg::Quat _orientation = (
osg::Matrix::rotate(_rawQuat) *
osg::Matrix( 0.0, 0.0, -1.0, 0.0,
1.0, 0.0, 0.0, 0.0,
0.0, -1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0)
).getRotate();
Here the second matrix basically should transform from local space to my world
space. X axis represents yaw, Y pitch and Z roll.
The orientation is pretty much correct... except the pitch is negated.
(Up is down and down is up).
So I figured, no problem. It's just a missing sign!
... if only reality was that simple.
All my attempts to modify that second rotation matrix have failed.
I end up creating Euler singularities or always exchange the wrong axes.
This kind of made me lose my mind and perspective, because I think I no longer
really understand what I'm doing.
Can somebody help me understand this?
Thank you!
Cheers,
Frank[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30954#30954
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org