Hi,
is there a tutorial where I can see how make the camera focus a
particular node, such that the node's bounding box will fit the viewer
window?
Thank you.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
HI Paulo,
On Sun, Feb 8, 2009 at 9:23 AM, Paulo Jnkml paulo.jn...@gmail.com wrote:
is there a tutorial where I can see how make the camera focus a particular
node, such that the node's bounding box will fit the viewer window?
Do you mean setting the home position of the camera position?
Hi,
thank you for replying.
Well maybe.
Imagine that I load a model so big or so small that with the current
camera parameters I can see a thing.
I want to adapt the camera automagically so that my current
loaded/selected scene/node will fit just nicely on screen.
=)
Paulo
Robert Osfield
HI Paulo,
What you need to do is to tell the active CameraManipulator that
you've updated the model it should be referring to and then call
viewer.home();
viewer.getCameraManipulator()-setNode(myNode);
viewer.getCameraManipulator()-computeHomePosition();
viewer.home();
Robert.
On Sun, Feb 8,
4 matches
Mail list logo