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/osgShadow/ShadowVolume.cpp

    r11478 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*/ 
     
    3939{ 
    4040    // _drawMode = osgShadow::ShadowVolumeGeometry::GEOMETRY; 
    41      
     41 
    4242    OSG_INFO<<"Warning: osgShadow::ShadowVolume technique is still in development, with current limitations that make it unsuitable for deployment. Please contact the osg-users for an update of developements."<<std::endl; 
    4343} 
     
    5757{ 
    5858    if (_drawMode == drawMode) return; 
    59      
     59 
    6060    _drawMode = drawMode; 
    61      
     61 
    6262    dirty(); 
    6363} 
     
    7272{ 
    7373    if (!_shadowedScene) return; 
    74      
    75     // get the bounds of the model.     
     74 
     75    // get the bounds of the model. 
    7676    osg::ComputeBoundsVisitor cbbv; 
    7777    _shadowedScene->osg::Group::traverse(cbbv); 
     
    118118        geode->addDrawable(_shadowVolume.get()); 
    119119    } 
    120      
     120 
    121121    { 
    122122 
     
    133133            _ambientLight->setDiffuse(zero_colour); 
    134134            _ss1->setAttributeAndModes(_ambientLight.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); 
    135              
     135 
    136136            _ss1->setMode(GL_LIGHTING, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); 
    137137        } 
     
    149149        { 
    150150            _shadowVolumeStateSet = new osg::StateSet; 
    151              
     151 
    152152            osg::Depth* depth = new osg::Depth; 
    153153            depth->setWriteMask(false); 
     
    228228 
    229229    } 
    230      
     230 
    231231    _dirty = false; 
    232232} 
     
    264264 
    265265    if (shadowVolumeBin.valid()) 
    266     {         
     266    { 
    267267        original_bin->setStateSet(_ss1.get()); 
    268268 
     
    277277        new_rs->setReadBuffer(orig_rs->getReadBuffer(), orig_rs->getReadBufferApplyMask()); 
    278278        new_rs->setColorMask(orig_rs->getColorMask()); 
    279          
     279 
    280280        osg::Vec4 lightpos; 
    281          
     281 
    282282        osg::ref_ptr<osgUtil::PositionalStateContainer> ps = new osgUtil::PositionalStateContainer; 
    283283        new_rs->setPositionalStateContainer(ps.get()); 
     
    296296                if (matrix) lightpos = light->getPosition() * (*matrix); 
    297297                else lightpos = light->getPosition(); 
    298                  
     298 
    299299                selectLight = light; 
    300300            } 
    301301            else 
    302302            { 
    303                 ps->addPositionedAttribute(itr->second.get(), itr->first.get());  
     303                ps->addPositionedAttribute(itr->second.get(), itr->first.get()); 
    304304            } 
    305305        } 
    306          
     306 
    307307        _ambientLight->setPosition(lightpos); 
    308308 
    309309        orig_rs->addPositionedAttribute(0,_ambientLight.get()); 
    310          
     310 
    311311        _diffuseLight->setPosition(lightpos); 
    312312        if (selectLight) 
    313313        { 
    314314            _ambientLight->setAmbient(selectLight->getAmbient()); 
    315              
     315 
    316316            _diffuseLight->setDiffuse(selectLight->getDiffuse()); 
    317317            _diffuseLight->setSpecular(selectLight->getSpecular()); 
     
    324324        } 
    325325        ps->addPositionedAttribute(0, _diffuseLight.get()); 
    326          
     326 
    327327        if (_lightpos != lightpos && _dynamicShadowVolumes) 
    328328        { 
     
    331331            osg::Matrix eyeToWorld; 
    332332            eyeToWorld.invert(*cv.getModelViewMatrix()); 
    333              
     333 
    334334            _occluder->computeShadowVolumeGeometry(lightpos * eyeToWorld, *_shadowVolume); 
    335335        } 
    336          
     336 
    337337        if (shadowVolumeBin.valid()) 
    338338        { 
     
    347347    } 
    348348 
    349     
     349 
    350350} 
    351351