Hi Vincent, void CameraManipulator::setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up, bool autoComputeHomePosition=false)
takes eye parameter as a position of the camera. Center is any position that camera is looking at, giving the orientation of the camera. However, for orientation of the camera, you have to provide even up vector, that is given as a third parameter. You can not orient the camera without up vector. The last parameter is a flag whether to recompute home position when you for instance, change the scene. You may be interested to take a look at void CameraManipulator::computeHomePosition(const osg::Camera *camera, bool useBoundingBox) method as well to automatically set home position for your scene. John > ------------ Original message ------------ > From: "vincent sauvage" <[email protected]> > Subject: [osg-users] unexecpted result with SetHomePosition > Date: 11. 2. 2011 17:04:12 > ---------------------------------------- > Hi, > > my question concern setHomePosition of MatrixManipulator and subclasses. > > Parameters are quite explicite and in therory first one indicate position > of camera, the seond parametre = target of camera ? Am i wrong... i surely > forget some detail since : in practice, position and direction of camera > do not corespond to the parameter given to that method . > > I read old topic and some source example. .. but results are sometimes so > strange when changing the parameters values, that make me think i should > konw some important thing or tip about this method .... > > Thank you for your help ! > > Cheers, > vincent > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=36563#36563 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

