Robert,

This doesn't work. The view stays the same. Maybe I should destroy the Terrain 
Manipulator and attach a new one the view...I've ran out of options.

- Nick -


----------------------------------------
> Date: Tue, 28 Aug 2007 09:58:41 +0100
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: 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()->setHomePosition(...);
> 
> 
> 
> On 8/28/07, Nick Prudent  wrote:
> >
> > OK,
> >
> > I've tried redefining the manipulator directly and I tried with the main 
> > camera. Both methods fail to actually update the trackball's center & 
> > radius.
> >
> > Ex:
> >
> > m_rpMainCamera->setViewMatrixAsLookAt( vnew_eye, vnew_center, vnew_up );
> >
> >     or...
> >
> > m_rpTerrainManipulator->setHomePosition( vnew_eye,v new_center, vnew_up );
> >
> > What's the recommended way to do this?
> >
> > Thanks,
> >
> > - Nick -
> >
> > >
> > > 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
> > >                                |
> > >              + Scene ----+ File 2
> > >              |                |
> > >              |                + File ...
> > > Root ----+
> > >              |
> > >              + Grid
> > >              |
> > >              + Axis
> > >              |
> > >              + HUD Camera
> > > (Both Root and Scene are Switch groups, so I can selectively show/hide 
> > > their children)
> > > The problem is that whenever I load a new file/node, it doesn't always 
> > > show up on screen. My guess is that some objects are outside the view 
> > > volume. I could write a simple function to update Scene's bounds and make 
> > > sure they fall within the fustrum, but I'm sure there's an existing 
> > > method to do this...
> > > - Nick -
> >
> > _________________________________________________________________
> > Connect to the next generation of MSN Messenger
> > http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
> > _______________________________________________
> > 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

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to