Hi,

I know I have been asking a lot of questions lately, sry :D
I try to access the rotation part of a Transformation Matrix by doing the 
following: osg::Quat rot = arTransform->getMatrix().getRotate();
I then try to access the values with this:
osg::Vec4d vec = rot.asVec4();
        int rx = vec.x();
        int ry = vec.y();
        int rz = vec.z();
        int rw = vec.w();
But all my values are = 0.
What I need to do is invert the rotation.
I was trying to do so with: rot.set(rx,ry,rz,rw);
but as I said no matter what I do rx, ry, rz and rw are always 0.
so that doesnt work do begin with.
is Quat the wrong way to go?
I am not exactly sure how a quat can hold the rotation for multiple axis in the 
first place? If it contains x,y and z values with one angle, how would it hold 
the rotation around x axis 30° as well as y axis 15° ?
Hope someone has time to give me some pointers in the right direction,
Thanks!
David

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16954#16954





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to