Show
Ignore:
Timestamp:
03/11/09 11:50:03 (5 years ago)
Author:
robert
Message:

From Martin Beckett, added get/setScrollWheelZoomDelta() support for controlling the mouse scroll wheel zoom delta.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgGA/TrackballManipulator.cpp

    r9891 r9896  
    1515    _distance = 1.0f; 
    1616    _trackballSize = 0.8f; 
     17    _zoomDelta = 0.1f; 
    1718} 
    1819 
     
    246247bool TrackballManipulator::calcMovement() 
    247248{ 
    248     // mosue scroll is only a single event 
     249    // mouse scroll is only a single event 
    249250    if (_ga_t0.get()==NULL) return false; 
    250251 
     
    255256    if (_ga_t0->getEventType()==GUIEventAdapter::SCROLL) 
    256257    { 
    257         dy = _ga_t0->getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_DOWN ? -0.1 : 0.1; 
     258        dy = _ga_t0->getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP ? _zoomDelta : -_zoomDelta; 
    258259        buttonMask=GUIEventAdapter::SCROLL; 
    259260    }