Re: [osg-users] ...framing only visible objects

2007-08-01 Thread alessandro terenzi
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

Re: [osg-users] ...framing only visible objects

2007-08-01 Thread Schmidt, Richard, SDGE1
Hi, I think the problem here is that some manipulators take the bounding box of the scenegraph to calculate the home position. Setting the nodemask to zero will not affect the bounding box, so the whole hierarchy is still regarded. One solution may be to fully detach the invisible node from the

Re: [osg-users] ...framing only visible objects

2007-08-01 Thread Peter Gebauer
Hello! I would overwrite the manipulator's way of home position calculation to only consider visible objects. By doing this you can basically test for whatever attributes you like on the nodes. It would also mean small, non-intrusive changes which can easily be reused and/or modified for

[osg-users] ...framing only visible objects

2007-07-31 Thread alessandro terenzi
Hello, using osgViewer, I see that pressing the spacebar the view is restored in order tor frame all the objects in the scene... I also noticed that it adjusts the camera in order to consider also objects that are not visible... how can I change this behaviour in order to frame just visible

Re: [osg-users] ...framing only visible objects

2007-07-31 Thread Robert Osfield
Hi Alessandro, The space bar is call home on the manipulator, and this takes the manipulators position to its home position, which you can set via... setHomePosition(,,); On 7/31/07, alessandro terenzi [EMAIL PROTECTED] wrote: Hello, using osgViewer, I see that pressing the spacebar the view

Re: [osg-users] ...framing only visible objects

2007-07-31 Thread Peter Gebauer
Hello! The spacebar event is simply setting the camera to the camera manipulator's home position. It does not modify your scenegraph, although it might appear that way. The home position is either calculated (default) or set using an eye and center coordinate along with the definition of up.

Re: [osg-users] ...framing only visible objects

2007-07-31 Thread Robert Osfield
Hi Alessandro, The OSG can't guess at all the different ways that you might want to set up the home position using automatic code, the default code for setting the position does OK for most models, but if you need something better tailored to your specific application needs then you need to