Re: [osg-users] Fitting Viewer's Camera To New Scene

2007-08-28 Thread Robert Osfield
HI Nick, Try getting the camera manipulator to recompute its home position when you change the scene via: viewer.getCameraManipulator()-computeHomePosition(); Or just set it manuual via: viewer.getCameraManipulator()-setHomePosition(...); On 8/28/07, Nick Prudent [EMAIL PROTECTED]

Re: [osg-users] Fitting Viewer's Camera To New Scene

2007-08-28 Thread Robert Osfield
: Re: [osg-users] Fitting Viewer's Camera To New Scene HI Nick, Try getting the camera manipulator to recompute its home position when you change the scene via: viewer.getCameraManipulator()-computeHomePosition(); Or just set it manuual via: viewer.getCameraManipulator

Re: [osg-users] Fitting Viewer's Camera To New Scene

2007-08-28 Thread Nick Prudent
Found this recent thread on changing the camera position: http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/15567/match=change+camera+position The solution mentionned goes like this: --- From: Matteo Campana Subject: Re: Change camera position

Re: [osg-users] Fitting Viewer's Camera To New Scene

2007-08-28 Thread Nick Prudent
Thanks Robert, * Using setHomePosition(...) + home() did the trick. Yes! * Using computeHomePosition() + home() pointed somewhere in space... I'm wondering if I can move from one place to the next on my terrain data using this technique...Trying it right now... Regards, - Nick -

[osg-users] Fitting Viewer's Camera To New Scene

2007-08-27 Thread Nick Prudent
How can I make sure an object fits inside a camera view after loading a new scene. All the examples load scenes and Viewer/Camera at startup. I want to add nodes to an existing scene; not create a new one.My OSG tree looks like this: + File 1