Re: [osg-users] About how to update the camera
Are you using a default manipulator or are you setting your camera position explicitly? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ramy panda Sent: Saturday, October 15, 2011 7:22 AM To: osg-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 the model in the view. I'm wondering that how to update the camera to make sure the model is showed in the center of the viewport after i import the model into the scene. Please be detail as i am a new user. Thanks very very very much. Thank you! Cheers, ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43421#43421 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About how to update the camera
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 model is showed in the center of the viewport after i import the model into the scene. Please be detail as i am a new user. Thanks very very very much. Thank you! Cheers, ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43421#43421 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[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 the model in the view. I'm wondering that how to update the camera to make sure the model is showed in the center of the viewport after i import the model into the scene. Please be detail as i am a new user. Thanks very very very much. Thank you! Cheers, ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43421#43421 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About how to update the camera
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 on scene. Cheers 15.10.2011, 17:22, ramy panda ramypanda@gmail.com: 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 model is showed in the center of the viewport after i import the model into the scene. Please be detail as i am a new user. Thanks very very very much. Thank you! Cheers, ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43421#43421 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org