HI Gianni, On 5 September 2012 14:12, Gianni Ambrosio <[email protected]> wrote: > is it possible to preserve the "distance" of a manipulator switching from a > TrackballManipulator to a NodeTrackerManipulator? I mean, I would just like > the camera to be rotated so that the tracking node is centered but I would > also like to use in the NodeTrackerManipulator the same distance of the > previous TrackballManipulator. I realized the setByMatrix() virtual method is > called switching from a manipulator to the other but I don't thing I can get > the distance from the passed Matrix. Is there a way to solve the problem?
A 4x4 view matrix just doesn't provide enough controls to provide the distance. Probably a better approach would be to provide a better mechanism for passing settings between camera manipulators, such as by provide a generic interface for querying parameters from the base class and then have the new manipulator pull the settings it requires in the form that it needs from the previous manipulator rather than pushing a 4x4 matrix from one to another. I'm open to suggestion for a new API to support this. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

