Show
Ignore:
Timestamp:
12/20/06 22:13:29 (8 years ago)
Author:
robert
Message:

Further work osgViewer::Viewer and related classes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgkeyboardmouse/osgkeyboardmouse.cpp

    r5764 r5832  
    164164                _mx = ea.getX(); 
    165165                _my = ea.getY(); 
     166                 
     167                osg::notify(osg::NOTICE)<<"_mx="<<_mx<<" _my="<<_my<<std::endl; 
     168                osg::notify(osg::NOTICE)<<"  range ="<<ea.getXmin()<<", "<<ea.getXmax()<<std::endl; 
     169                 
    166170                return false; 
    167171            } 
     
    191195        osg::Group* parent = 0; 
    192196 
    193         bool usePolytopePicking = true; 
     197        bool usePolytopePicking = false; 
    194198        if (usePolytopePicking) 
    195199        { 
     
    359363    // set the mouse input range. 
    360364    // Producer defaults to using non-dimensional units, so we pass this onto osgGA, most windowing toolkits use pixel coords so use the window size instead. 
    361     viewer.getEventQueue()->getCurrentEventState()->setInputRange(-1.0, -1.0, 1.0, 1.0); 
     365    viewer.getEventQueue()->setUseFixedMouseInputRange(true); 
     366    viewer.getEventQueue()->setMouseInputRange(-1.0, -1.0, 1.0, 1.0); 
    362367 
    363368    // Producer has the y axis increase upwards, like OpenGL, and contary to most Windowing toolkits. 
    364369    // we need to construct the event queue so that it knows about this convention. 
    365370    viewer.getEventQueue()->getCurrentEventState()->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS); 
     371     
    366372 
    367373    viewer.init(); 
     
    371377    { 
    372378        // update the window dimensions, in case the window has been resized. 
    373          viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight(), false); 
     379         viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight()); 
    374380 
    375381        // pass any keyboard mouse events onto the local keyboard mouse callback.