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/osgVolume/FixedFunctionTechnique.cpp

    r12597 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 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*/ 
     
    4747{ 
    4848    if (_numSlices==numSlices) return; 
    49      
     49 
    5050    _numSlices = numSlices; 
    51      
     51 
    5252    if (_volumeTile) _volumeTile->setDirty(true); 
    5353} 
    54   
     54 
    5555osg::Node* createCube(const osg::Vec3& center, float size, unsigned int numSlices) 
    5656{ 
     
    7575        (*coords)[i*4+3].set(halfSize,y,halfSize); 
    7676    } 
    77      
     77 
    7878    osg::Vec3Array* normals = new osg::Vec3Array(1); 
    7979    (*normals)[0].set(0.0f,-1.0f,0.0f); 
     
    9292    billboard->addDrawable(geom); 
    9393    billboard->setPosition(0,center); 
    94      
     94 
    9595    return billboard; 
    9696} 
     
    120120 
    121121    float alphaFuncValue = 0.1; 
    122     
     122 
    123123    osg::Image* image_3d = 0; 
    124124    osgVolume::Locator* masterLocator = _volumeTile->getLocator(); 
    125     osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;  
     125    osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT; 
    126126 
    127127    image_3d = _volumeTile->getLayer()->getImage(); 
    128      
     128 
    129129    CollectPropertiesVisitor cpv; 
    130130    if (_volumeTile->getLayer()->getProperty()) 
     
    155155        matrix = masterLocator->getTransform(); 
    156156    } 
    157      
     157 
    158158    OSG_NOTICE<<"Matrix = "<<matrix<<std::endl; 
    159159 
     
    165165    osg::Vec3d v010 = osg::Vec3d(0.0,1.0,0.0) * matrix; 
    166166    osg::Vec3d v110 = osg::Vec3d(1.0,1.0,0.0) * matrix; 
    167      
     167 
    168168    osg::Vec3d v001 = osg::Vec3d(0.0,0.0,1.0) * matrix; 
    169169    osg::Vec3d v101 = osg::Vec3d(1.0,0.0,1.0) * matrix; 
    170170    osg::Vec3d v011 = osg::Vec3d(0.0,1.0,1.0) * matrix; 
    171171    osg::Vec3d v111 = osg::Vec3d(1.0,1.0,1.0) * matrix; 
    172      
     172 
    173173    double cubeSize = (v111-v000).length(); 
    174174    osg::Vec3d center = (v000+v111)*0.5; 
     
    186186    osg::TexGenNode* texgenNode_0 = new osg::TexGenNode; 
    187187    texgenNode_0->addChild(clipnode); 
    188     texgenNode_0->setTextureUnit(0);                                                                                                                               
    189     texgenNode_0->getTexGen()->setMode(osg::TexGen::EYE_LINEAR);                                                                                                   
    190     texgenNode_0->getTexGen()->setPlanesFromMatrix(osg::Matrix::inverse(matrix));                                                             
     188    texgenNode_0->setTextureUnit(0); 
     189    texgenNode_0->getTexGen()->setMode(osg::TexGen::EYE_LINEAR); 
     190    texgenNode_0->getTexGen()->setPlanesFromMatrix(osg::Matrix::inverse(matrix)); 
    191191 
    192192    osg::StateSet* stateset = texgenNode_0->getOrCreateStateSet(); 
     
    194194    stateset->setMode(GL_LIGHTING,osg::StateAttribute::ON); 
    195195    stateset->setMode(GL_BLEND,osg::StateAttribute::ON); 
    196      
     196 
    197197    if (cpv._afProperty.valid()) 
    198198    { 
     
    203203        stateset->setAttributeAndModes(new osg::AlphaFunc(osg::AlphaFunc::GREATER,alphaFuncValue), osg::StateAttribute::ON); 
    204204    } 
    205      
     205 
    206206    osg::Material* material = new osg::Material; 
    207207    material->setDiffuse(osg::Material::FRONT_AND_BACK,osg::Vec4(1.0f,1.0f,1.0f,1.0f)); 
    208208    stateset->setAttributeAndModes(material); 
    209      
     209 
    210210    if (cpv._mipProperty.valid()) 
    211211    { 
     
    226226    texture3D->setWrap(osg::Texture3D::WRAP_S,osg::Texture3D::CLAMP_TO_EDGE); 
    227227    texture3D->setWrap(osg::Texture3D::WRAP_T,osg::Texture3D::CLAMP_TO_EDGE); 
    228     if (image_3d->getPixelFormat()==GL_ALPHA ||  
     228    if (image_3d->getPixelFormat()==GL_ALPHA || 
    229229        image_3d->getPixelFormat()==GL_LUMINANCE) 
    230230    { 
     
    246246 
    247247    stateset->setTextureAttributeAndModes(0,new osg::TexEnv(),osg::StateAttribute::ON); 
    248          
     248 
    249249    _node = texgenNode_0; 
    250250} 
     
    257257void FixedFunctionTechnique::cull(osgUtil::CullVisitor* cv) 
    258258{ 
    259     //OSG_NOTICE<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;     
     259    //OSG_NOTICE<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl; 
    260260    if (_node.valid()) 
    261261    { 
     
    284284            update(uv); 
    285285            return; 
    286         }         
    287          
     286        } 
     287 
    288288    } 
    289289    else if (nv.getVisitorType()==osg::NodeVisitor::CULL_VISITOR) 
     
    298298 
    299299 
    300     if (_volumeTile->getDirty())  
     300    if (_volumeTile->getDirty()) 
    301301    { 
    302302        OSG_INFO<<"******* Doing init ***********"<<std::endl; 
     
    304304    } 
    305305} 
    306      
     306