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
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
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
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 -
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
5 matches
Mail list logo