osg控制相机移动
viewer->getCameraManipulator()->setHomePosition(_homeEye,_homeCenter,_homeUp);
osg::Vec3d _homeEye; osg::Vec3d _homeCenter; osg::Vec3d _homeUp; /** Manually set the home position, and set the automatic compute of home position. */ virtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up, bool autoComputeHomePosition=false) { setAutoComputeHomePosition(autoComputeHomePosition); _homeEye = eye; _homeCenter = center; _homeUp = up; } /** Get the manually set home position. */ virtual void getHomePosition(osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up) const { eye = _homeEye; center = _homeCenter; up = _homeUp; }
##############################