Changeset 13041 for OpenSceneGraph/trunk/src/osgGA/SphericalManipulator.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgGA/SphericalManipulator.cpp
r12292 r13041 288 288 dy = _ga_t0->getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP ? _zoomDelta : -_zoomDelta; 289 289 buttonMask=GUIEventAdapter::SCROLL; 290 } 291 else 290 } 291 else 292 292 { 293 293 … … 296 296 dy = _ga_t0->getYnormalized()-_ga_t1->getYnormalized(); 297 297 float distance = sqrtf(dx*dx + dy*dy); 298 298 299 299 // return if movement is too fast, indicating an error in event values or change in screen. 300 300 if (distance>0.5) … … 302 302 return false; 303 303 } 304 304 305 305 // return if there is no movement. 306 306 if (distance==0.0f) … … 311 311 buttonMask = _ga_t1->getButtonMask(); 312 312 } 313 313 314 314 double throwScale = (_thrown && _ga_t0.valid() && _ga_t1.valid()) ? 315 315 _delta_frame_time / (_ga_t0->getTime() - _ga_t1->getTime()) : 1.0; … … 354 354 _elevation-=throwScale*dy*osg::PI_4; 355 355 356 // Only allows vertical rotation of 180deg 356 // Only allows vertical rotation of 180deg 357 357 if(_elevation < -osg::PI_2) 358 358 _elevation=-osg::PI_2;
