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/osg/KdTree

    r12139 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*/ 
     
    2424 
    2525/** Implementation of a kdtree for Geometry leaves, to enable fast intersection tests.*/ 
    26 class OSG_EXPORT KdTree : public osg::Shape  
     26class OSG_EXPORT KdTree : public osg::Shape 
    2727{ 
    2828    public: 
    29      
    30          
     29 
     30 
    3131        KdTree(); 
    32          
     32 
    3333        KdTree(const KdTree& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); 
    3434 
    3535        META_Shape(osg, KdTree) 
    36          
     36 
    3737        struct OSG_EXPORT BuildOptions 
    3838        { 
    3939            BuildOptions(); 
    40                          
     40 
    4141            unsigned int _numVerticesProcessed; 
    4242            unsigned int _targetNumTrianglesPerLeaf; 
    4343            unsigned int _maxNumLevels; 
    4444        }; 
    45          
    46          
     45 
     46 
    4747        /** Build the kdtree from the specified source geometry object. 
    48           * retun true on success. */  
     48          * retun true on success. */ 
    4949        virtual bool build(BuildOptions& buildOptions, osg::Geometry* geometry); 
    50          
     50 
    5151        struct LineSegmentIntersection 
    5252        { 
     
    7878 
    7979            unsigned int                    primitiveIndex; 
    80         };         
    81          
     80        }; 
     81 
    8282 
    8383        typedef std::vector<LineSegmentIntersection> LineSegmentIntersections; 
    84          
     84 
    8585        /** compute the intersection of a line segment and the kdtree, return true if an intersection has been found.*/ 
    8686        virtual bool intersect(const osg::Vec3d& start, const osg::Vec3d& end, LineSegmentIntersections& intersections) const; 
     
    101101            osg::BoundingBox bb; 
    102102 
    103             value_type first;     
     103            value_type first; 
    104104            value_type second; 
    105105        }; 
    106      
     106 
    107107        struct Triangle 
    108108        { 
    109109            Triangle(): 
    110110                p0(0),p1(0),p2(0) {} 
    111          
     111 
    112112            Triangle(unsigned int ip0, unsigned int ip1, unsigned int ip2): 
    113113                p0(ip0), p1(ip1), p2(ip2) {} 
     
    132132        int addNode(const KdNode& node) 
    133133        { 
    134             int num = static_cast<int>(_kdNodes.size());  
    135             _kdNodes.push_back(node);  
     134            int num = static_cast<int>(_kdNodes.size()); 
     135            _kdNodes.push_back(node); 
    136136            return num; 
    137137        } 
     
    139139        KdNode& getNode(int nodeNum) { return _kdNodes[nodeNum]; } 
    140140        const KdNode& getNode(int nodeNum) const { return _kdNodes[nodeNum]; } 
    141          
     141 
    142142        KdNodeList& getNodes() { return _kdNodes; } 
    143143        const KdNodeList& getNodes() const { return _kdNodes; } 
     
    171171{ 
    172172    public: 
    173      
     173 
    174174        KdTreeBuilder(); 
    175      
     175 
    176176        KdTreeBuilder(const KdTreeBuilder& rhs); 
    177177 
     
    181181 
    182182        void apply(osg::Geode& geode); 
    183      
     183 
    184184        KdTree::BuildOptions _buildOptions; 
    185185 
     
    187187 
    188188 
    189                  
     189 
    190190    protected: 
    191      
     191 
    192192        virtual ~KdTreeBuilder() {} 
    193          
     193 
    194194}; 
    195195