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/osgTerrain/Layer.cpp

    r12292 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*/ 
     
    2626        return; 
    2727    } 
    28      
     28 
    2929    if (compoundstring.size()==4) 
    3030    { 
     
    3333        return; 
    3434    } 
    35      
     35 
    3636    std::string::size_type secondcolonpos = compoundstring.find_first_of(':', setcolonpos+4); 
    3737    if (secondcolonpos==std::string::npos) 
     
    7979    osg::BoundingSphere bs; 
    8080    if (!getLocator()) return bs; 
    81      
     81 
    8282    if (treatAsElevationLayer) 
    8383    { 
     
    9191                float value = 0.0f; 
    9292                bool validValue = getValidValue(c,r, value); 
    93                 if (validValue)  
     93                if (validValue) 
    9494                { 
    9595                    osg::Vec3d ndc, v; 
    96                     ndc.x() = ((double)c)/(double)(numColumns-1),  
     96                    ndc.x() = ((double)c)/(double)(numColumns-1), 
    9797                    ndc.y() = ((double)r)/(double)(numRows-1); 
    9898                    ndc.z() = value; 
     
    109109    else 
    110110    { 
    111      
     111 
    112112        osg::Vec3d v; 
    113113        if (getLocator()->convertLocalToModel(osg::Vec3d(0.5,0.5,0.0), v)) 
     
    122122 
    123123    } 
    124          
     124 
    125125    return bs; 
    126126} 
     
    147147} 
    148148 
    149 template <typename T, class O>     
     149template <typename T, class O> 
    150150void _processRow(unsigned int num, GLenum pixelFormat, T* data,const O& operation) 
    151151{ 
     
    162162} 
    163163 
    164 template <class O>     
     164template <class O> 
    165165void processRow(unsigned int num, GLenum pixelFormat, GLenum dataType, unsigned char* data, const O& operation) 
    166166{ 
     
    177177} 
    178178 
    179 template <class O>     
     179template <class O> 
    180180void processImage(osg::Image* image, const O& operation) 
    181181{ 
    182182    if (!image) return; 
    183      
     183 
    184184    for(int r=0;r<image->r();++r) 
    185185    { 
     
    204204    inline void operator() (int& v) const { v = (int)(_offset + (float)v * _scale); } 
    205205    inline void operator() (float& v) const { v = _offset + v * _scale; } 
    206      
     206 
    207207    float _offset, _scale; 
    208208}; 
     
    216216 
    217217    processImage(_image.get(), TransformOperator(offset,scale)); 
    218      
     218 
    219219    dirty(); 
    220220 
     
    227227    switch(_image->getDataType()) 
    228228    { 
    229         case(GL_BYTE):  
    230             value = *((const char*)data);  
     229        case(GL_BYTE): 
     230            value = *((const char*)data); 
    231231            // OSG_NOTICE<<"byte "<<value<<std::endl; 
    232232            break; 
    233         case(GL_UNSIGNED_BYTE):  
     233        case(GL_UNSIGNED_BYTE): 
    234234            value = *data; 
    235235            // OSG_NOTICE<<"Unsigned byte "<<value<<std::endl; 
     
    255255            value = *((const float*)data); 
    256256            break; 
    257         default:  
    258             value = _defaultValue.x();  
     257        default: 
     258            value = _defaultValue.x(); 
    259259            return false; 
    260260    } 
     
    438438    osg::FloatArray* heights = _heightField->getFloatArray(); 
    439439    if (!heights) return false; 
    440      
     440 
    441441    OSG_INFO<<"HeightFieldLayer::transform("<<offset<<","<<scale<<")"<<std::endl;; 
    442442 
     
    447447        *itr = offset + (*itr) * scale; 
    448448    } 
    449      
     449 
    450450    dirty(); 
    451451 
     
    614614    std::string filename; 
    615615    extractSetNameAndFileName(compoundname, setname, filename); 
    616      
     616 
    617617    _layers[i].setname = setname; 
    618618    _layers[i].filename = filename;