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/osgUtil/IntersectionVisitor.cpp

    r11742 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*/ 
     
    5151{ 
    5252    IntersectorGroup* ig = new IntersectorGroup; 
    53      
     53 
    5454    // now copy across all intersectors that arn't disabled. 
    5555    for(Intersectors::iterator itr = _intersectors.begin(); 
     
    6969{ 
    7070    if (disabled()) return false; 
    71      
     71 
    7272    bool foundIntersections = false; 
    73      
     73 
    7474    for(Intersectors::iterator itr = _intersectors.begin(); 
    7575        itr != _intersectors.end(); 
     
    8080        else (*itr)->incrementDisabledCount(); 
    8181    } 
    82      
    83     if (!foundIntersections)  
     82 
     83    if (!foundIntersections) 
    8484    { 
    8585        // need to call leave to clean up the DisabledCount's. 
     
    8787        return false; 
    8888    } 
    89      
     89 
    9090    // we have found at least one suitable intersector, so return true 
    9191    return true; 
     
    114114        { 
    115115            (*itr)->intersect(iv, drawable); 
    116              
     116 
    117117            ++numTested; 
    118118        } 
    119119    } 
    120      
     120 
    121121    // OSG_NOTICE<<"Number testing "<<numTested<<std::endl; 
    122122 
     
    126126{ 
    127127    Intersector::reset(); 
    128      
     128 
    129129    for(Intersectors::iterator itr = _intersectors.begin(); 
    130130        itr != _intersectors.end(); 
     
    156156    // override the default node visitor mode. 
    157157    setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN); 
    158      
     158 
    159159    _useKdTreesWhenAvailable = true; 
    160160    _dummyTraversal = false; 
    161      
     161 
    162162    _lodSelectionMode = USE_HIGHEST_LEVEL_OF_DETAIL; 
    163163    _eyePointDirty = true; 
    164      
     164 
    165165    LineSegmentIntersector* ls = dynamic_cast<LineSegmentIntersector*>(intersector); 
    166     if (ls)  
     166    if (ls) 
    167167    { 
    168168        setReferenceEyePoint(ls->getStart()); 
     
    176176 
    177177    setIntersector(intersector); 
    178      
     178 
    179179    setReadCallback(readCallback); 
    180180} 
     
    196196        osg::ref_ptr<Intersector> intersector = _intersectorStack.front(); 
    197197        intersector->reset(); 
    198          
     198 
    199199        _intersectorStack.clear(); 
    200200        _intersectorStack.push_back(intersector); 
     
    309309        else 
    310310            targetRangeValue = 0; // Init low to find max value 
    311              
     311 
    312312        const osg::LOD::RangeList rl = plod.getRangeList(); 
    313313        osg::LOD::RangeList::const_iterator rit; 
     
    364364            } 
    365365        } 
    366 #else     
     366#else 
    367367        // older code than above block, that assumes that the PagedLOD is ordered correctly 
    368368        // i.e. low res children first, no duplicate ranges. 
    369          
     369 
    370370        osg::ref_ptr<osg::Node> highestResChild; 
    371371 
     
    374374            highestResChild = _readCallback->readNodeFile( plod.getDatabasePath() + plod.getFileName(plod.getNumFileNames()-1) ); 
    375375        } 
    376          
     376 
    377377        if ( !highestResChild.valid() && plod.getNumChildren()>0) 
    378378        { 
     
    404404 
    405405    traverse(transform); 
    406      
     406 
    407407    // pop the clone. 
    408408    pop_clone(); 
    409      
     409 
    410410    popModelMatrix(); 
    411411 
     
    425425 
    426426    traverse(projection); 
    427      
     427 
    428428    // pop the clone. 
    429429    pop_clone(); 
    430      
     430 
    431431    popProjectionMatrix(); 
    432432 
     
    441441    // note, commenting out right now because default Camera setup is with the culling active.  Should this be changed? 
    442442    // if (!enter(camera)) return; 
    443      
     443 
    444444    // OSG_NOTICE<<"inside apply(Camera&)"<<std::endl; 
    445445 
     
    456456            model = new osg::RefMatrix(*getModelMatrix()); 
    457457        } 
    458         else // pre multiply  
     458        else // pre multiply 
    459459        { 
    460460            projection = new osg::RefMatrix(camera.getProjectionMatrix()*(*getProjectionMatrix())); 
    461461            view = new osg::RefMatrix(*getViewMatrix()); 
    462462            model = new osg::RefMatrix(camera.getViewMatrix()*(*getModelMatrix())); 
    463         }        
    464     }  
     463        } 
     464    } 
    465465    else 
    466466    { 
     
    470470        model =  new osg::RefMatrix(); 
    471471    } 
    472   
     472 
    473473    if (camera.getViewport()) pushWindowMatrix( camera.getViewport() ); 
    474474    pushProjectionMatrix(projection); 
     
    480480 
    481481    traverse(camera); 
    482      
     482 
    483483    // pop the clone. 
    484484    pop_clone(); 
    485      
     485 
    486486    popModelMatrix(); 
    487487    popViewMatrix(); 
     
    499499    switch (_referenceEyePointCoordinateFrame) 
    500500    { 
    501         case(Intersector::WINDOW):  
     501        case(Intersector::WINDOW): 
    502502            if (getWindowMatrix()) matrix.preMult( *getWindowMatrix() ); 
    503503            if (getProjectionMatrix()) matrix.preMult( *getProjectionMatrix() ); 
     
    505505            if (getModelMatrix()) matrix.preMult( *getModelMatrix() ); 
    506506            break; 
    507         case(Intersector::PROJECTION):  
     507        case(Intersector::PROJECTION): 
    508508            if (getProjectionMatrix()) matrix.preMult( *getProjectionMatrix() ); 
    509509            if (getViewMatrix()) matrix.preMult( *getViewMatrix() ); 
    510510            if (getModelMatrix()) matrix.preMult( *getModelMatrix() ); 
    511511            break; 
    512         case(Intersector::VIEW):  
     512        case(Intersector::VIEW): 
    513513            if (getViewMatrix()) matrix.preMult( *getViewMatrix() ); 
    514514            if (getModelMatrix()) matrix.preMult( *getModelMatrix() ); 
     
    524524    _eyePoint = _referenceEyePoint * inverse; 
    525525    _eyePointDirty = false; 
    526      
     526 
    527527    return _eyePoint; 
    528528}