[osg-users] ...framing only visible objects
Robert Osfield
robert.osfield at gmail.com
Wed Aug 1 02:47:02 PDT 2007
Hi Alessandro,
On 8/1/07, alessandro terenzi <a.terenzi at gmail.com> wrote:
> I realized that is possible to attach a MatrixManipulator to a specific
> node, for example the one that I want to zoom on.
> So, I can handle some events (key down for example), and if I call the
> MatrixManipulator::home() method after having attached the node to the
> manipulator, then I manage to frame the object currently displayed.
> Problem is that in this way I always need both a GUIEventAdapter and a
> GUIActionAdapter to pass to the home(.) method...
If you call viewer.home() then it'll pass the adapters for you.
> I saw that there is also a method
> MatrixManipulator::computeHomePosition() that I expected to
> do the same and doesn't take any parameter, but actually if I call this
> method instead of home(.) the point of view doesn't change at all... why?
Well it computes the home position it doesn't move you to the home
position, its simply the equivalent of setHomePosition.
More information about the osg-users
mailing list