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

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/CullStack.cpp

    r7212 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*/ 
     
    2929    _index_modelviewCullingStack = 0; 
    3030    _back_modelviewCullingStack = 0; 
    31      
     31 
    3232    _referenceViewPoints.push_back(osg::Vec3(0.0f,0.0f,0.0f)); 
    3333} 
     
    4444    _index_modelviewCullingStack = 0; 
    4545    _back_modelviewCullingStack = 0; 
    46      
     46 
    4747    _referenceViewPoints.push_back(osg::Vec3(0.0f,0.0f,0.0f)); 
    4848} 
     
    6666    _referenceViewPoints.clear(); 
    6767    _referenceViewPoints.push_back(osg::Vec3(0.0f,0.0f,0.0f)); 
    68      
     68 
    6969    _eyePointStack.clear(); 
    7070    _viewPointStack.clear(); 
     
    7979 
    8080    osg::Vec3 lookVector(0.0,0.0,-1.0); 
    81      
     81 
    8282    _bbCornerFar = (lookVector.x()>=0?1:0) | 
    8383                   (lookVector.y()>=0?2:0) | 
     
    8585 
    8686    _bbCornerNear = (~_bbCornerFar)&7; 
    87      
     87 
    8888    _currentReuseMatrixIndex=0; 
    8989} 
     
    9494    _MVPW_Stack.push_back(0L); 
    9595 
    96     if (_index_modelviewCullingStack==0)  
     96    if (_index_modelviewCullingStack==0) 
    9797    { 
    9898        if (_modelviewCullingStack.empty()) 
     
    101101        _modelviewCullingStack[_index_modelviewCullingStack++].set(_projectionCullingStack.back()); 
    102102    } 
    103     else  
    104     { 
    105      
     103    else 
     104    { 
     105 
    106106        const osg::Viewport& W = *_viewportStack.back(); 
    107107        const osg::Matrix& P = *_projectionStack.back(); 
     
    109109 
    110110        osg::Vec4 pixelSizeVector = CullingSet::computePixelSizeVector(W,P,M); 
    111          
    112         if (_index_modelviewCullingStack>=_modelviewCullingStack.size())  
     111 
     112        if (_index_modelviewCullingStack>=_modelviewCullingStack.size()) 
    113113        { 
    114114            _modelviewCullingStack.push_back(CullingSet()); 
    115115        } 
    116          
     116 
    117117        _modelviewCullingStack[_index_modelviewCullingStack++].set(_projectionCullingStack.back(),*_modelviewStack.back(),pixelSizeVector); 
    118          
    119     } 
    120      
     118 
     119    } 
     120 
    121121    _back_modelviewCullingStack = &_modelviewCullingStack[_index_modelviewCullingStack-1]; 
    122122 
     
    137137{ 
    138138    _MVPW_Stack.pop_back(); 
    139      
     139 
    140140    --_index_modelviewCullingStack; 
    141141    if (_index_modelviewCullingStack>0) _back_modelviewCullingStack = &_modelviewCullingStack[_index_modelviewCullingStack-1]; 
     
    158158{ 
    159159    _projectionStack.push_back(matrix); 
    160      
     160 
    161161    _projectionCullingStack.push_back(osg::CullingSet()); 
    162162    osg::CullingSet& cullingSet = _projectionCullingStack.back(); 
    163      
     163 
    164164    // set up view frustum. 
    165165    cullingSet.getFrustum().setToUnitFrustum(((_cullingMode&NEAR_PLANE_CULLING)!=0),((_cullingMode&FAR_PLANE_CULLING)!=0)); 
    166166    cullingSet.getFrustum().transformProvidingInverse(*matrix); 
    167      
     167 
    168168    // set the culling mask ( There should be a more elegant way!)  Nikolaus H. 
    169169    cullingSet.setCullingMask(_cullingMode); 
     
    171171    // set the small feature culling. 
    172172    cullingSet.setSmallFeatureCullingPixelSize(_smallFeatureCullingPixelSize); 
    173      
     173 
    174174    // set up the relevant occluders which a related to this projection. 
    175175    for(ShadowVolumeOccluderList::iterator itr=_occluderList.begin(); 
     
    184184        } 
    185185    } 
    186      
    187      
     186 
     187 
    188188 
    189189    // need to recompute frustum volume. 
     
    211211 
    212212    _modelviewStack.push_back(matrix); 
    213      
     213 
    214214    pushCullingSet(); 
    215      
     215 
    216216    osg::Matrix inv; 
    217217    inv.invert(*matrix); 
    218218 
    219      
     219 
    220220    switch(referenceFrame) 
    221221    { 
     
    233233        { 
    234234            _eyePointStack.push_back(inv.getTrans()); 
    235              
     235 
    236236            osg::Vec3 referenceViewPoint = getReferenceViewPoint(); 
    237237            if (originalModelView) 
     
    250250 
    251251 
    252     osg::Vec3 lookVector = getLookVectorLocal();                    
    253      
     252    osg::Vec3 lookVector = getLookVectorLocal(); 
     253 
    254254    _bbCornerFar = (lookVector.x()>=0?1:0) | 
    255255                   (lookVector.y()>=0?2:0) | 
     
    257257 
    258258    _bbCornerNear = (~_bbCornerFar)&7; 
    259                                         
     259 
    260260} 
    261261 
     
    263263{ 
    264264    _modelviewStack.pop_back(); 
    265      
     265 
    266266    _eyePointStack.pop_back(); 
    267267    _referenceViewPoints.pop_back(); 
     
    300300    _frustumVolume = computeVolume(f1,f2,f3,b1,b2,b3)+ 
    301301                     computeVolume(f2,f3,f4,b1,b3,b4); 
    302          
    303 } 
     302 
     303}