Hi J-S, Yup, the documentation certainly helped. In this case I blame automatic code completion and bad assumptions. I thought there would be something in osg::Matrix that would return the individual composing parts and autocomplete suggested getRotate() when I typed in 'get'. I just assumed that is the right thing to use, without actually going to check the documentation. My bad :)
Cheers, Morné On Fri, Dec 5, 2008 at 2:44 PM, Jean-Sébastien Guay <[EMAIL PROTECTED]> wrote: > Hello Morné, > >> Calling getRotate() on the matrix can give unexpected >> results if there was also a scale transform involved. The correct way >> is to call Matrix.decompose(..) to get to the contributing parts: > > I was going to point that out, and it's even in the osg::Matrix header doc > comments for getRotate() I think... > > Just looked it up, and yes: > > _____________________ > > Quat osg::Matrixd::getRotate() const > > Get the matrix rotation as a Quat. > > Note that this function assumes a non-scaled matrix and will return > incorrect results for scaled matrixces. Consider decompose() instead. > _____________________ > > > Good to see you found it yourself. It means the doxygen comments really do > work! We should add more of them (darn don't tell me I started the > documentation discussion again...) :-) > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay [EMAIL PROTECTED] > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org