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/osgPlugins/ive/HeightFieldLayer.cpp

    r12292 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 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*/ 
     
    3737    { 
    3838        osg::HeightField* hf = getHeightField(); 
    39      
     39 
    4040        // using inline heightfield 
    41         out->writeBool(true);         
     41        out->writeBool(true); 
    4242        if (out->getVersion()>=VERSION_0035) 
    4343        { 
     
    5353 
    5454            float maxError = 0.0f; 
    55              
     55 
    5656            if (getLocator()) 
    5757            { 
    5858                osg::Vec3d world_origin, world_corner; 
    59                  
     59 
    6060                getLocator()->convertLocalToModel(osg::Vec3d(0.0,0.0,0.0), world_origin); 
    6161                getLocator()->convertLocalToModel(osg::Vec3d(1.0,1.0,0.0), world_corner); 
    62                  
     62 
    6363                double distance = (world_origin-world_corner).length(); 
    64                  
     64 
    6565                maxError = distance * out->getTerrainMaximumErrorToSizeRatio(); 
    6666            } 
     
    7171        { 
    7272            out->writeShape(getHeightField()); 
    73         }     
     73        } 
    7474 
    7575    } 
     
    7777    { 
    7878        // using external heightfield file 
    79         out->writeBool(false);         
    80         out->writeString(getFileName());         
     79        out->writeBool(false); 
     80        out->writeString(getFileName()); 
    8181    } 
    8282 
     
    8989    if (id != IVEHEIGHTFIELDLAYER) 
    9090        in_THROW_EXCEPTION("HeightFieldLayer::read(): Expected HeightFieldLayer identification."); 
    91      
     91 
    9292    // Read Layer's identification. 
    9393    id = in->readInt(); 
     
    102102 
    103103    bool useInlineHeightField = in->readBool(); 
    104      
     104 
    105105    if (useInlineHeightField) 
    106106    { 
    107      
     107 
    108108        if (in->getVersion()>=VERSION_0035) 
    109109        { 
    110110            osg::HeightField* hf = new osg::HeightField; 
    111              
     111 
    112112            // Read HeightField's properties 
    113113            //setColor(in->readVec4()); 
    114114            unsigned int col = in->readUInt(); 
    115             unsigned int row = in->readUInt();         
     115            unsigned int row = in->readUInt(); 
    116116            hf->allocate(col,row); 
    117117 
     
    128128                in->readPackedFloatArray(hf->getFloatArray()); 
    129129            } 
    130              
     130 
    131131            setHeightField(hf); 
    132132 
     
    136136            osg::Shape* shape = in->readShape(); 
    137137            setHeightField(dynamic_cast<osg::HeightField*>(shape)); 
    138         }     
     138        } 
    139139 
    140140    } 
     
    143143        std::string filename = in->readString(); 
    144144        setFileName(filename); 
    145          
     145 
    146146        setHeightField(osgDB::readHeightFieldFile(filename,in->getOptions())); 
    147147    }