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 
specific needs.

/Peter


On 2007-07-31 (Tue) 18:59, alessandro terenzi wrote:
> Thanks.
> 
> ...my problem is that if the scene consists of many objects, and some of
> them are hidden, the default camera is set to look to everything anyway, I
> mean that the camera looks at the whole scene comprising hidden objects too.
> 
> ...instead, I'd like to re-adjust the camera not only from the position
> point of view (actually, it is ok to look at the origin), but also with
> respect to other parameters in order to adjust the view only on visible
> objects ...in particular, my application is a kind of presentation of 3d
> objects, so just one object per time is visible and is positioned in the
> origin, so actually I don't need to look elsewhere, but I just need to
> adjust the camera's 'zoom' in order to frame just the currently visible
> object... can you suggest a way to achive this adjustment?... which
> parameters should I modify?
> 
> ...by the way, each object has its own size that can differs a lot with
> other objects, that is the problem with the default camera settings, because
> it zoomes out to view everything...
> 
> Thanks. Best regards.
> Alessandro
> 
> On 7/31/07, Peter Gebauer <[EMAIL PROTECTED]> wrote:
> >
> > 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.
> >
> > See osgGA::MatrixManipulator and osgViewer::Viewer for more info.
> >
> > /Peter
> >
> > On 2007-07-31 (Tue) 17:08, alessandro terenzi wrote:
> > > 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 objects?
> > > Where can I have a look in osg code to understand how the 'spacebar'
> > event
> > > is handled?
> > >
> > > Thank you. Best regards.
> > > Alessandro
> >
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >

> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to