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

    r12298 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        if (prototype) return dynamic_cast<RenderBin*>(prototype->clone(osg::CopyOp::DEEP_COPY_ALL)); 
    7575    } 
    76      
     76 
    7777    OSG_WARN <<"Warning: RenderBin \""<<binName<<"\" implementation not found, using default RenderBin as a fallback."<<std::endl; 
    7878    return new RenderBin; 
     
    124124    { 
    125125        s_defaultBinSortModeInitialized = true; 
    126          
     126 
    127127        const char* str = getenv("OSG_DEFAULT_BIN_SORT_MODE"); 
    128128        if (str) 
     
    135135        } 
    136136    } 
    137      
     137 
    138138    return s_defaultBinSortMode; 
    139139} 
     
    161161        _stateset  = new osg::StateSet; 
    162162        _stateset->setThreadSafeRefUnref(true); 
    163          
     163 
    164164         // set up an alphafunc by default to speed up blending operations. 
    165165#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE 
     
    167167        alphafunc->setFunction(osg::AlphaFunc::GREATER,0.0f); 
    168168        alphafunc->setThreadSafeRefUnref(true); 
    169          
     169 
    170170        _stateset->setAttributeAndModes(alphafunc, osg::StateAttribute::ON); 
    171171#endif 
    172172    } 
    173 #endif     
     173#endif 
    174174} 
    175175 
     
    213213        itr->second->sort(); 
    214214    } 
    215      
    216     if (_sortCallback.valid())  
     215 
     216    if (_sortCallback.valid()) 
    217217    { 
    218218        _sortCallback->sortImplementation(this); 
    219219    } 
    220220    else sortImplementation(); 
    221      
     221 
    222222    _sorted = true; 
    223223} 
     
    297297}; 
    298298 
    299      
     299 
    300300void RenderBin::sortFrontToBack() 
    301301{ 
     
    304304    // now sort the list into acending depth order. 
    305305    std::sort(_renderLeafList.begin(),_renderLeafList.end(),FrontToBackSortFunctor()); 
    306      
     306 
    307307//    cout << "sort front to back"<<endl; 
    308308} 
     
    357357 
    358358    _renderLeafList.reserve(totalsize); 
    359      
     359 
    360360    bool detectedNaN = false; 
    361          
     361 
    362362    // first copy all the leaves from the render graphs into the leaf list. 
    363363    for(itr=_stateGraphList.begin(); 
     
    379379        } 
    380380    } 
    381      
     381 
    382382    if (detectedNaN) OSG_NOTICE<<"Warning: RenderBin::copyLeavesFromStateGraphListToRenderLeafList() detected NaN depth values, database may be corrupted."<<std::endl; 
    383      
     383 
    384384    // empty the render graph list to prevent it being drawn along side the render leaf list (see drawImplementation.) 
    385385    _stateGraphList.clear(); 
     
    418418void RenderBin::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) 
    419419{ 
    420     if (_drawCallback.valid())  
     420    if (_drawCallback.valid()) 
    421421    { 
    422422        _drawCallback->drawImplementation(this,renderInfo,previous); 
     
    536536        const Drawable* dw= rl->getDrawable(); 
    537537        stats.addDrawable(); // number of geosets 
    538          
     538 
    539539        const Geometry* geom = dw->asGeometry(); 
    540540        if (geom) 
     
    548548            stats.addMatrix(); // number of matrices 
    549549        } 
    550          
     550 
    551551        if (dw) 
    552552        { 
     
    561561        ++oitr) 
    562562    { 
    563          
     563 
    564564        for(StateGraph::LeafList::const_iterator dw_itr = (*oitr)->_leaves.begin(); 
    565565            dw_itr != (*oitr)->_leaves.end(); 
     
    646646        count += rbitr->second->computeNumberOfDynamicRenderLeaves(); 
    647647    } 
    648      
     648 
    649649    return count; 
    650650}