[osgearth][原]仿照谷歌,修改oe漫游器中focal(视角切换)功能
oe中的视角加速感觉好奇怪,就仿照谷歌方式去改了。 先看看oe原来的漫游器改变视角的接口: void CameraManipulator::setViewpoint( const Viewpoint& vp, double duration_seconds) { // If the manip is not set up, save the viewpoint for later. if ( ! established() ) { _pendingViewpoint = vp; _pendingViewpointDuration. set (duration_seconds, Units::SECONDS); } else { // Save any existing tether node so we can properly invoke the callback. osg::ref_ptr<osg::Node> oldEndNode; if ( isTethering() && _tetherCallback.valid() ) _setVP1 -> getNode(oldEndNode); // starting viewpoint; all fields will be set: _setVP0 = getViewpoint(); // ending viewpoint