[osg-users] Trackball and view question

David Spilling david.spilling at gmail.com
Wed Oct 3 01:38:10 PDT 2007

Question 1) : You are trying to retrieve the Euler angles (i.e. rotation
about X,Y,Z in some order) from a matrix. You can google for "Euler" and
Matrix; alternatively start here:


Question 2) : As mentioned in previous replies, the translation retrieved
will incorporate the lookDistance of the camera; hence you need to store and
control the lookDistance of the camera - this is a bit similar to the idea
of "zoom" on the trackball.

For what it's worth, I do this with a combination of distance =
(eye-centre).length(),  trackball->setDistance(distance), and also retrieve
the matrix with

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071003/d419a41e/attachment-0007.htm>

More information about the osg-users mailing list