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/txp/TileMapper.cpp

    r12536 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 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*/ 
     
    4444    const osg::Matrix& matrix = *_modelviewStack.back(); 
    4545    float dist = distance(pos,matrix); 
    46      
     46 
    4747    if (withLODScale) 
    4848        return dist*getLODScale(); 
     
    5353void TileMapper::apply(osg::Node& node) 
    5454{ 
    55     if (node.getName()=="TileContent")  
     55    if (node.getName()=="TileContent") 
    5656    { 
    5757        _containsGeode = true; 
     
    7373void TileMapper::apply(osg::Group& node) 
    7474{ 
    75     if (node.getName()=="TileContent")  
     75    if (node.getName()=="TileContent") 
    7676    { 
    7777        _containsGeode = true; 
     
    8686 
    8787    TileIdentifier* tid = dynamic_cast<TileIdentifier*>(node.getUserData()); 
    88      
     88 
    8989    if (tid) 
    9090    { 
     
    103103 
    104104        } 
    105      
     105 
    106106    } 
    107107 
     
    172172    } 
    173173    TileIdentifier parent_tid(tid.x/2,tid.y/2,tid.lod-1); 
    174      
     174 
    175175    bool parentHasNorthNeighour = _tileMap.count(TileIdentifier(parent_tid.x,  parent_tid.y+1,parent_tid.lod))!=0; 
    176176    bool parentHasEastNeighour  = _tileMap.count(TileIdentifier(parent_tid.x+1,parent_tid.y,  parent_tid.lod))!=0; 
    177177    bool parentHasSouthNeighour = _tileMap.count(TileIdentifier(parent_tid.x,  parent_tid.y-1,parent_tid.lod))!=0; 
    178178    bool parentHasWestNeighour  = _tileMap.count(TileIdentifier(parent_tid.x-1,parent_tid.y,  parent_tid.lod))!=0; 
    179      
     179 
    180180 
    181181    // identify whether the tile is a NE/SE/SW/NW tile relative to its parent. 
    182182    osg::Vec3 delta(tid.x%2,tid.y%2,0); 
    183      
     183 
    184184    if (delta.y()>0.0f) // noth side 
    185     {         
     185    { 
    186186        if (delta.x()>0.0f) 
    187187        { 
     
    192192                return parentHasEastNeighour; 
    193193        } 
    194         else  
     194        else 
    195195        { 
    196196            // NW 
     
    211211                return parentHasEastNeighour; 
    212212        } 
    213         else  
     213        else 
    214214        { 
    215215            // SW 
     
    220220        } 
    221221    } 
    222      
     222 
    223223    return false; 
    224224}