Hi Xiaodong, Could it be that you are looking for the camera manipulator setHomePosition or computeHomePosition method? i.e.
viewer.getCamaraManipulator()->setHomePosition(...); Robert. On Mon, Mar 3, 2008 at 2:35 AM, Wu Xiaodong <[EMAIL PROTECTED]> wrote: > > Hi, I am freshman in OpenSceneGrapph. Now I have some issue on updating the > Camera when the Geode under it was updated. > > the details of the issue is as following. > > 1st step. I build a viewer and its scene graph with only one osg::Geometry > which contains nothing. and set a TrackballManipulator to the viewer's > camera; > > osg::ref_ptr<osgGA::TrackballManipulator> trackBall = new > osgGA::TrackballManipulator; > setCameraManipulator( trackBall.get() ); > 2nd step. I update the one Geometry by a object of the class derived from > the Geometry node's UpdateCallBack class; > > the default track ball center seems to be the (0,0,0); when the Gemetry is > updated, the Geometry node's center is changed into (x0,y0,z0); but the > track ball rotate around the vertex ( 0,0,0). How can I make it rotate > around the (x0,y0,z0 ); > > I read the OSG's reference docs, may I can achieve it by > setPreDrawCallback (DrawCallback *cb) . > > Is there any advice about the application above, Thanks. > > Xiaodong Wu > > > > > > _______________________________________________ > 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