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/include/osgSim/LineOfSight

    r12701 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*/ 
     
    2525    public: 
    2626        DatabaseCacheReadCallback(); 
    27          
     27 
    2828        void setMaximumNumOfFilesToCache(unsigned int maxNumFilesToCache) { _maxNumFilesToCache = maxNumFilesToCache; } 
    2929        unsigned int  getMaximumNumOfFilesToCache() const { return _maxNumFilesToCache; } 
    30          
     30 
    3131        void clearDatabaseCache(); 
    32          
     32 
    3333        void pruneUnusedDatabaseCache(); 
    3434 
    3535        virtual osg::Node* readNodeFile(const std::string& filename); 
    36          
     36 
    3737    protected: 
    38      
     38 
    3939        typedef std::map<std::string, osg::ref_ptr<osg::Node> > FileNameSceneMap; 
    40          
     40 
    4141        unsigned int _maxNumFilesToCache; 
    4242        OpenThreads::Mutex  _mutex; 
     
    4545 
    4646/** Helper class for setting up and acquiring line of sight intersections with terrain. 
    47   * By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading  
     47  * By default assigns a osgSim::DatabaseCacheReadCallback that enables automatic loading 
    4848  * of external PagedLOD tiles to ensure that the highest level of detail is used in intersections. 
    4949  * This automatic loading of tiles is done by the intersection traversal that is done within 
     
    5555{ 
    5656    public : 
    57      
     57 
    5858        LineOfSight(); 
    5959 
    6060        /** Clear the internal LOS List so it contains no line of sight tests.*/ 
    6161        void clear(); 
    62      
     62 
    6363        /** Add a line of sight test, consisting of start and end point. Returns the index number of the newly adding LOS test.*/ 
    6464        unsigned int addLOS(const osg::Vec3d& start, const osg::Vec3d& end); 
    65          
     65 
    6666        /** Get the number of line of sight tests.*/ 
    6767        unsigned int getNumLOS() const { return _LOSList.size(); } 
    68          
     68 
    6969        /** Set the start point of single line of sight test.*/ 
    7070        void setStartPoint(unsigned int i, const osg::Vec3d& start) { _LOSList[i]._start = start; } 
     
    7878        /** Get the end point of single line of sight test.*/ 
    7979        const osg::Vec3d& getEndPoint(unsigned int i) const { return _LOSList[i]._end; } 
    80          
     80 
    8181        typedef std::vector<osg::Vec3d> Intersections; 
    8282 
     
    9090        /** Compute the intersection between the specified scene graph and a single LOS start,end pair. Returns an IntersectionList, of all the points intersected.*/ 
    9191        static Intersections computeIntersections(osg::Node* scene, const osg::Vec3d& start, const osg::Vec3d& end, osg::Node::NodeMask traversalMask=0xffffffff); 
    92          
    93          
     92 
     93 
    9494        /** Clear the database cache.*/ 
    9595        void clearDatabaseCache() { if (_dcrc.valid()) _dcrc->clearDatabaseCache(); } 
     
    102102        /** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/ 
    103103        DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); } 
    104          
     104 
    105105    protected : 
    106      
     106 
    107107        struct LOS 
    108108        { 
     
    110110                _start(start), 
    111111                _end(end) {} 
    112                  
    113              
     112 
     113 
    114114            osg::Vec3d      _start; 
    115115            osg::Vec3d      _end; 
    116116            Intersections   _intersections; 
    117117        }; 
    118          
     118 
    119119        typedef std::vector<LOS> LOSList; 
    120120        LOSList _LOSList; 
    121          
     121 
    122122        osg::ref_ptr<DatabaseCacheReadCallback> _dcrc; 
    123123        osgUtil::IntersectionVisitor            _intersectionVisitor;