Changeset 13041 for OpenSceneGraph/trunk/src/osgViewer/HelpHandler.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgViewer/HelpHandler.cpp
r7515 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 43 43 osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa); 44 44 if (!view) return false; 45 45 46 46 osgViewer::ViewerBase* viewer = view->getViewerBase(); 47 47 if (!viewer) return false; 48 48 49 49 if (ea.getHandled()) return false; 50 50 … … 86 86 87 87 if (!window) 88 { 88 { 89 89 osgViewer::Viewer::Windows windows; 90 90 viewer->getWindows(windows); … … 157 157 158 158 const osg::ApplicationUsage::UsageMap& keyboardBinding = _applicationUsage->getKeyboardMouseBindings(); 159 159 160 160 for(osg::ApplicationUsage::UsageMap::const_iterator itr = keyboardBinding.begin(); 161 161 itr != keyboardBinding.end(); … … 197 197 if (width > 1024.0f) ratio = 1024.0f/width; 198 198 if (height*ratio > 800.0f) ratio = 800.0f/height; 199 200 _camera->setViewMatrix(osg::Matrix::translate(-bb.center()) * 201 osg::Matrix::scale(ratio,ratio,ratio) * 199 200 _camera->setViewMatrix(osg::Matrix::translate(-bb.center()) * 201 osg::Matrix::scale(ratio,ratio,ratio) * 202 202 osg::Matrix::translate(osg::Vec3(640.0f, 520.0f, 0.0f))); 203 203 }
