Show
Ignore:
Timestamp:
01/05/10 12:09:18 (5 years ago)
Author:
robert
Message:

Added set/getDistance() method

Files:
1 modified

Legend:

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

    r7064 r10913  
    5757} 
    5858 
     59/** Set the distance parameter (used by TrackballManipulator etc.) */ 
     60void KeySwitchMatrixManipulator::setDistance(double distance) 
     61{ 
     62    for(KeyManipMap::iterator itr=_manips.begin(); 
     63        itr!=_manips.end(); 
     64        ++itr) 
     65    { 
     66        itr->second.second->setDistance(distance); 
     67    } 
     68} 
     69 
     70double KeySwitchMatrixManipulator::getDistance() const 
     71{ 
     72    if(!_current) 
     73    { 
     74        return _current->getDistance(); 
     75    } 
     76    else return 1.0; 
     77} 
     78 
    5979void KeySwitchMatrixManipulator::setNode(osg::Node* node) 
    6080{