Re: [osg-users] get the x-axis angle of a rotation

2009-06-04 Thread Christian Sam
Hi james, regarding your last post, did you mean that you also tried to extract angles from a rotation with the website's matrixToEuler or a similar approach, but you encountered problems that were depended on your current camera-orientation? i think the same happened to me: i wanted to get

Re: [osg-users] get the x-axis angle of a rotation

2009-06-04 Thread James Killian
sent is what I use today. - Original Message - From: Christian Sam osgfo...@tevs.eu To: osg-users@lists.openscenegraph.org Sent: Thursday, June 04, 2009 1:51 PM Subject: Re: [osg-users] get the x-axis angle of a rotation Hi james, regarding your last post, did you mean that you also

Re: [osg-users] get the x-axis angle of a rotation

2009-06-04 Thread Christian Sam
Hi james, thanks for the quick reply, now everything is clear. Best regards, Christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13531#13531 ___ osg-users mailing list

[osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Christian Sam
Hi, i have a manipulator which stores the rotation in a quaternion. i would like to extract the angle of the, in matrix-words, x-axis of that rotation. (think of a firstperson-view - i would like to extract the angle which defines how much i look up/down) is there an easy way to get this done?

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Maxime BOUCHER
Hi, Your X-rotation is pure in the quaternion. In the matrix all rotations in each plane will be mixed and, except in the case where Y-rotation and Z-rotation are equal to 0, you will get a very perturbated information. But if you really want to get a matrix, you can declare one and then call

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Maxime BOUCHER
You really should work with the quaternion. I tried once to avoid it, it was a very bad idea. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13423#13423 ___ osg-users mailing list

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Christian Sam
Hi max, thanks for the hint i needed some time to inform myself about quaternions, because like you, i tried to avoid using them. you mentioned Your X-rotation is pure in the quaternion., nevertheless i don't know how to get only the Pitch-rotation (to say it in euler words) out of them.

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread James Killian
,RAD_2_DEG(RollOffset)); return ret; } - Original Message - From: Christian Sam osgfo...@tevs.eu To: osg-users@lists.openscenegraph.org Sent: Wednesday, June 03, 2009 6:59 AM Subject: [osg-users] get the x-axis angle of a rotation Hi, i have a manipulator which stores

Re: [osg-users] get the x-axis angle of a rotation

2009-06-03 Thread Christian Sam
Hi, i had to do a little further research on the web because first i didn't understand what your code-snippet is doing. i found a website which describes the whole topic: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm; thank you james and max for