Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

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

    r11475 r13041  
    2929            _shift(false), 
    3030            _ctrl(false) 
    31 {  
     31{ 
    3232    _minHeightAboveGround          = 2.0; 
    3333    _minDistanceInFront            = 5.0; 
     
    6868    osgUtil::IntersectionVisitor iv(lsi.get()); 
    6969    iv.setTraversalMask(_intersectTraversalMask); 
    70      
     70 
    7171    _node->accept(iv); 
    72      
     72 
    7373    if (lsi->containsIntersections()) 
    7474    { 
     
    8383    _node = node; 
    8484 
    85     if (getAutoComputeHomePosition())  
     85    if (getAutoComputeHomePosition()) 
    8686        computeHomePosition(); 
    8787 
     
    100100 
    101101 
    102 const char* UFOManipulator::className() const  
    103 {  
    104     return "UFO";  
    105 } 
    106  
    107 void UFOManipulator::setByMatrix( const osg::Matrixd &mat )  
     102const char* UFOManipulator::className() const 
     103{ 
     104    return "UFO"; 
     105} 
     106 
     107void UFOManipulator::setByMatrix( const osg::Matrixd &mat ) 
    108108{ 
    109109    _inverseMatrix = mat; 
     
    118118} 
    119119 
    120 void UFOManipulator::setByInverseMatrix( const osg::Matrixd &invmat)  
     120void UFOManipulator::setByInverseMatrix( const osg::Matrixd &invmat) 
    121121{ 
    122122    _matrix = invmat; 
     
    136136} 
    137137 
    138 osg::Matrixd UFOManipulator::getInverseMatrix() const  
     138osg::Matrixd UFOManipulator::getInverseMatrix() const 
    139139{ 
    140140    return (_inverseMatrix * _offset); 
     
    150150    /* 
    151151       * Find the ground - Assumption: The ground is the hit of an intersection 
    152        * from a line segment extending from above to below the database at its  
     152       * from a line segment extending from above to below the database at its 
    153153       * horizontal center, that intersects the database closest to zero. */ 
    154154 
     
    192192} 
    193193 
    194 void UFOManipulator::home(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us)  
     194void UFOManipulator::home(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us) 
    195195{ 
    196196    home(ea.getTime()); 
     
    200200} 
    201201 
    202 void UFOManipulator::home(double)  
    203 { 
    204     if (getAutoComputeHomePosition())  
     202void UFOManipulator::home(double) 
     203{ 
     204    if (getAutoComputeHomePosition()) 
    205205        computeHomePosition(); 
    206206 
     
    257257void UFOManipulator::getUsage(osg::ApplicationUsage& usage) const 
    258258{ 
    259     /** Way too busy.  This needs to wait until we have a scrollable window  
     259    /** Way too busy.  This needs to wait until we have a scrollable window 
    260260    usage.addKeyboardMouseBinding("UFO Manipulator: <SpaceBar>",        "Reset the viewing angle to 0.0"); 
    261261    usage.addKeyboardMouseBinding("UFO Manipulator: <UpArrow>",         "Acceleration forward."); 
     
    430430                        _directionRotationRate = 0.0; 
    431431                } 
    432                  
     432 
    433433            } 
    434434            break; 
     
    465465      osg::Vec3d _sideVec = _direction * osg::Matrix::rotate( -M_PI*0.5, upVec); 
    466466 
    467         _position += ((_direction       * _forwardSpeed) +  
     467        _position += ((_direction       * _forwardSpeed) + 
    468468                      (_sideVec         * _sideSpeed) + 
    469469                      (upVec * _upSpeed)) 
     
    477477 
    478478    _yawOffset   += _yawOffsetRate   * _dt; 
    479     if( _yawOffset >= M_PI || _yawOffset < -M_PI )  
     479    if( _yawOffset >= M_PI || _yawOffset < -M_PI ) 
    480480        _yawOffset *= -1; 
    481481 
     
    486486    _adjustPosition(); 
    487487 
    488     _inverseMatrix.makeLookAt( _position, _position + _direction, upVec);  
     488    _inverseMatrix.makeLookAt( _position, _position + _direction, upVec); 
    489489    _matrix.invert(_inverseMatrix); 
    490490 
     
    541541    // Check intersects infront. 
    542542    osg::Vec3d ip; 
    543     if (intersect(_position,  
     543    if (intersect(_position, 
    544544                  _position + (_direction * (_minDistanceInFront * 3.0)), 
    545545                  ip )) 
     
    553553        } 
    554554    } 
    555      
     555 
    556556    // Check intersects below. 
    557557    osg::CoordinateFrame cf( getCoordinateFrame(_position) ); 
    558558    osg::Vec3d upVec( getUpVector(cf) ); 
    559559 
    560     if (intersect(_position,  
    561                   _position - upVec*_minHeightAboveGround*3,  
     560    if (intersect(_position, 
     561                  _position - upVec*_minHeightAboveGround*3, 
    562562                  ip )) 
    563563    {