Hi,

I want to show data from matrix and want to make it editable by user.

I've got osg::Matrix f.e. mat, so i do mat.getRotate , mat.getScale,
mat.GetTrans and i have problem with getRotate.
It returns Quat and i want to convert to HPR but as far as i know this
quaternion is scaled but maybe i am wrong.
f.e i get x= 0.5 y= -0.005 z =0.005 w= 0.005 and i compare to original HPR
and it should be x= 0.5 y= -0.5 z =0.5 w= 0.5 to get needed rotation x=90deg
y =-90deg z=0deg
so i mul some of the values by 100.
Next i save angles  (scale and trans too )  and convert to quaternion
(mat2.makeScale, mat2.setTrans, mat.setRotate) and i can get original
matrix. I mul this quaternion by scale etc. and still this matrix isn't
original.
What am i doing wrong?

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

Reply via email to