Thank you Robert, I think that your advise concerning setting home position in previous mail is good for my objectives.
Anyway, considering that I agree with you upon the fact that I need to write my own code to frame a single object (I mean setting the zoom on a particular object) I'd like to have a look at the code that is used in OSG to frame all object with the default camera in osgViewer, I think it will be really inspiring, but I don't know exactly where to look... I guess that there is a place in OSG code that maybe computes the bounding sphere/box of the whole scene and then set the camera's parameters to frame the scene using the extensions of that bounding volume, just guessing... Thanks. Best regards. Alessandro On 7/31/07, Robert Osfield <[EMAIL PROTECTED]> wrote: > > 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 either code your own manipulator/subclass from one of the > existing ones, or just set the home position yourself as per my > earlier email. > > Robert. > > On 7/31/07, alessandro terenzi <[EMAIL PROTECTED]> 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 >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

