HI Olfat, On Sun, Dec 14, 2008 at 10:11 AM, olfat ibrahim <[email protected]> wrote: > I need to change my chnnel or camera view for an upper view > i tried to to use : > > osg::Matrix lookAt; > lookAt.makeLookAt(osg::Vec3(0.0f, 0.0f, 0.0f), osg::Vec3(0.0f, 0.0f, > 0.0f), osg::Vec3(0.0f, 0.0f, 0.0f)); > viewer.getCamera()->setViewMatrix(lookAt); > > but the program crashed
But the program crashed.... so perhaps one should go look into why this might have happend, this is what we have debuggers for. FYI, osgViewer::Viewer will be default has a master camera so the above operation should always work so you must have done some odd to break it in this instance. > > i tried to use : > > viewer.setCameraManipulator(new osgGA::TrackballManipulator()); > > viewer.getCameraManipulator()->setHomePosition(osg::Vec3d(0.0,-5.0,0.0),osg::Vec3d(0.0,0.0,0.0),osg::Vec3d(0.0,0.0,1.0)); > > but nothing happened > > can any one help me ?? Setting the home position does just that is sets the home position, it doesn't change the camera camera manipulators current view settings till you call home(), once you do the values of the home position will be applied to the camera manipulator, and then on the next frame the values of the camera manipulator will be applied to the camera. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

