Changeset 9896
- Timestamp:
- 03/11/09 11:50:03 (4 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 2 modified
-
include/osgGA/TrackballManipulator (modified) (2 diffs)
-
src/osgGA/TrackballManipulator.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgGA/TrackballManipulator
r7648 r9896 79 79 double getMinimumZoomScale() const { return _minimumZoomScale; } 80 80 81 /** set the mouse scroll wheel zoom delta. 82 * Range -1.0 to +1.0, -ve value inverts wheel direction and zero switches off scroll wheel. */ 83 void setScroolWheelZoomDelta(double zoomDelta) { _zoomDelta = zoomDelta; } 84 85 /** get the mouse scroll wheel zoom delta. */ 86 double getScroolWheelZoomDelta() const { return _zoomDelta; } 87 81 88 /** Set the center of the trackball. */ 82 89 void setCenter(const osg::Vec3d& center) { _center = center; } … … 140 147 double _distance; 141 148 float _trackballSize; 149 float _zoomDelta; 142 150 143 151 }; -
OpenSceneGraph/trunk/src/osgGA/TrackballManipulator.cpp
r9891 r9896 15 15 _distance = 1.0f; 16 16 _trackballSize = 0.8f; 17 _zoomDelta = 0.1f; 17 18 } 18 19 … … 246 247 bool TrackballManipulator::calcMovement() 247 248 { 248 // mo sue scroll is only a single event249 // mouse scroll is only a single event 249 250 if (_ga_t0.get()==NULL) return false; 250 251 … … 255 256 if (_ga_t0->getEventType()==GUIEventAdapter::SCROLL) 256 257 { 257 dy = _ga_t0->getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_ DOWN ? -0.1 : 0.1;258 dy = _ga_t0->getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP ? _zoomDelta : -_zoomDelta; 258 259 buttonMask=GUIEventAdapter::SCROLL; 259 260 }
