[osg-users] ...framing only visible objects
alessandro terenzi
a.terenzi at gmail.com
Tue Jul 31 09:59:12 PDT 2007
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 <peter.gebauer at stockholm.bostream.se> 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
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070731/94928895/attachment-0001.htm
More information about the osg-users
mailing list