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:

http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm

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
trackball->getInverseMatrix().getLookAt(eye,look,up,distance).

David
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to