Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-19 Thread Trajce Nikolov NICK
Hi Jason, I had to apply -90 (in degrees) to the pitch to get the correct results after getHPRFromQuat(). Also createMatrix is expecting the input in degrees. Maybe this will help Nick On Fri, Dec 19, 2014 at 3:10 AM, Jason Anderssen janders...@exactal.com wrote: Hi NICK, Thank you for

Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-19 Thread Jordi Torres
Hi Jason et al, I think in osgWorks there are utilities for such a conversion. Take a look to https://code.google.com/p/osgworks/source/browse/trunk/src/osgwTools/Orientation.cpp Cheers. 2014-12-19 9:10 GMT+01:00 Trajce Nikolov NICK trajce.nikolov.n...@gmail.com : Hi Jason, I had to apply

Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-19 Thread Jason Anderssen
Thank you very much, I shall test this and see that f it resolves my issues, by looking over it quickly I think it will. Cheers Jason Sent from my iPhone On 19 Dec 2014, at 18:17, Jordi Torres jtorresfa...@gmail.commailto:jtorresfa...@gmail.com wrote: Hi Jason et al, I think in osgWorks

Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-18 Thread Trajce Nikolov NICK
Hi Jason, here you have YPR from osg::Quat (look at the snippets) http://forum.openscenegraph.org/viewtopic.php?t=548 As for the other way it is easy, you create the Matrix and get the rotate Quat, (return matrix.getRotate()), something like: osg::Matrixd Utils::createMatrix(double x, double

Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-18 Thread Jason Anderssen
Hi NICK, Thank you for your reply. What do you think I maybe doing wrong with the following code : (NOTE: getHPRfromQuat is cut and paste from link, and the createMatrix is cut and paste from your reply. I was basically hoping that q2 == q after the conversion to and from osg::Quat

[osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-17 Thread Jason Anderssen
Hi all, Just wondering if in OSG there is anywhere I can extract either Yaw pitch and roll / or XYZ eular angles, too and from either a matrix or a quaternion? Thank you in advance. Cheers Jason Anderssen Internet Email Confidentiality Footer: This email and any files transmitted with it

Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-17 Thread Chris Hanson
Just wondering if in OSG there is anywhere I can extract either Yaw pitch and roll / or XYZ eular angles, too and from either a matrix or a quaternion? The void http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a01593.html#a306a73ea16dfe10406725cefb3867dfa get

Re: [osg-users] Yaw pitch and roll or xyz conversion to and from Quaternion

2014-12-17 Thread Jason Anderssen
Hi Chris, Thank you for you reply. I had a look at those, maybe I can get it to work with them, but I really just want a simple 3 values for Yaw Pitch and Roll, from which I can re-create the exactly same Quat or Matrix. I will also clarify, I don’t care about translation or scale etc, and