-users@lists.openscenegraph.org
Subject: [osg-users] About how to update the camera
Hi,
Now I have faced a problem is that when i import a model into my own
application, the model is not show at the center of the viewport, only
after interacted with the model using translate function i can see
Hi Ramy,
If it's just the home position of the camera manipuilator that you
want to set them use
viewer.getCameraManipulator()-setHomePosition(..), or to move the
camera to that home position call viewer.home();.
Robert.
On Sat, Oct 15, 2011 at 2:22 PM, ramy panda ramypanda@gmail.com wrote:
Hi,
Now I have faced a problem is that when i import a model into my own
application, the model is not show at the center of the viewport, only after
interacted with the model using translate function i can see the model in the
view. I'm wondering that how to update the camera to make sure the
Hi, Ramy
By default camera view matrix is identity. You should set view matrix on viewer
camera to get what you want, or use camera manipulator.
Also you can use viewer::run() instead of calling viewer::frame() in loop, this
call (along with other things) adds camera manipulator and center view
4 matches
Mail list logo