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/DriveManipulator.cpp

    r11475 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    7474        //_height = sqrtf(_modelScale)*0.03; 
    7575        //_buffer = sqrtf(_modelScale)*0.05; 
    76          
     76 
    7777        _height = getHeightOfDriver(); 
    7878        _buffer = _height*2.5; 
    7979    } 
    80     if (getAutoComputeHomePosition()) computeHomePosition();     
     80    if (getAutoComputeHomePosition()) computeHomePosition(); 
    8181} 
    8282 
     
    9999    osgUtil::IntersectionVisitor iv(lsi.get()); 
    100100    iv.setTraversalMask(_intersectTraversalMask); 
    101      
     101 
    102102    _node->accept(iv); 
    103      
     103 
    104104    if (lsi->containsIntersections()) 
    105105    { 
     
    185185 
    186186    computePosition(_homeEye, _homeCenter, _homeUp); 
    187      
     187 
    188188    _velocity = 0.0; 
    189      
     189 
    190190    _pitch = 0.0; 
    191191 
     
    430430    osg::Vec3d u(s^f); 
    431431    u.normalize(); 
    432      
     432 
    433433    osg::Matrixd rotation_matrix(s[0],     u[0],     -f[0],     0.0, 
    434434                                 s[1],     u[1],     -f[1],     0.0, 
    435435                                 s[2],     u[2],     -f[2],     0.0, 
    436436                                 0.0,       0.0,       0.0,     1.0); 
    437                     
     437 
    438438    _eye = eye; 
    439439    _rotation = rotation_matrix.getRotate().inverse(); 
     
    453453        dt = 0.0; 
    454454    } 
    455      
     455 
    456456    double accelerationFactor = _height*10.0; 
    457457 
     
    495495    osg::Matrixd rotation_matrix; 
    496496    rotation_matrix.makeRotate(_rotation); 
    497      
     497 
    498498    osg::Vec3d up = osg::Vec3d(0.0,1.0,0.0) * rotation_matrix; 
    499499    osg::Vec3d lv = osg::Vec3d(0.0,0.0,-1.0) * rotation_matrix; 
     
    505505    double yaw = -inDegrees(dx*50.0*dt); 
    506506 
    507      
     507 
    508508#ifdef KEYBOARD_PITCH 
    509509    double pitch_delta = 0.5; 
     
    521521    _pitch += dy*dt; 
    522522#endif 
    523      
     523 
    524524    osg::Quat yaw_rotation; 
    525525    yaw_rotation.makeRotate(yaw,up); 
    526      
     526 
    527527    _rotation *= yaw_rotation; 
    528      
     528 
    529529    rotation_matrix.makeRotate(_rotation); 
    530530 
     
    539539        if (distanceToMove>=0.0) signedBuffer=_buffer; 
    540540        else signedBuffer=-_buffer; 
    541          
     541 
    542542        // check to see if any obstruction in front. 
    543543        osg::Vec3d ip, np; 
     
    575575 
    576576        } 
    577          
     577 
    578578        // no hit on the terrain found therefore resort to a fall under 
    579579        // under the influence of gravity. 
     
    599599 
    600600        lv *= (_velocity*dt); 
    601          
     601 
    602602        _eye += lv; 
    603603    }