Dear All,I need to switch off the camera manipulator in one of the views in 
composite viewer.  Setting the view->setCameraManipulator(NULL); doesn't work 
in my case, setting camera manipulator to the 0 value doesn't help also. 
Furthermore, having calling the 
view->getCamera()->setProjectionMatrixAsOrtho2D(-newx,newx,-newy,newy);in each 
scrolling doesn't cause any wreak havoc or any performance penalty, right?
case ( osgGA::GUIEventAdapter::MOVE):                {                    newx 
= ea.getX(); newy = ea.getY();                    break;                }       
     case (osgGA::GUIEventAdapter::SCROLL):                {                    
osgGA::GUIEventAdapter::ScrollingMotion sm = ea.getScrollingMotion();           
         switch (sm)                    {                    case 
osgGA::GUIEventAdapter::SCROLL_UP :                        {                    
        newx -=5; newy -=5;                            
view->getCamera()->setProjectionMatrixAsOrtho2D(-newx,newx,-newy,newy);         
                   break;
                        }                    
case(osgGA::GUIEventAdapter::SCROLL_DOWN):                        {             
               newx += 5; newy +=5;                            
view->getCamera()->setProjectionMatrixAsOrtho2D(-newx,newx,-newy,newy);         
                   break;                        }                    }         
          // 
view->getCamera()->setProjectionMatrixAsOrtho2D(-newx,newx,-newy,newy);         
       }                                         
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to