Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/BoundingSphere

    r10228 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*/ 
     
    3636    public: 
    3737        typedef VT vec_type; 
    38         typedef typename VT::value_type value_type;         
     38        typedef typename VT::value_type value_type; 
    3939 
    4040        vec_type    _center; 
    4141        value_type  _radius; 
    4242 
    43         /** Construct a default bounding sphere with radius to -1.0f, representing an invalid/unset bounding sphere.*/  
     43        /** Construct a default bounding sphere with radius to -1.0f, representing an invalid/unset bounding sphere.*/ 
    4444        BoundingSphereImpl() : _center(0.0,0.0,0.0),_radius(-1.0) {} 
    45      
     45 
    4646        /** Creates a bounding sphere initialized to the given extents. */ 
    4747        BoundingSphereImpl(const vec_type& center, value_type radius) : _center(center),_radius(radius) {} 
     
    6464        inline bool valid() const { return _radius>=0.0; } 
    6565 
    66         /** Set the bounding sphere to the given center/radius using floats. */  
     66        /** Set the bounding sphere to the given center/radius using floats. */ 
    6767        inline void set(const vec_type& center,value_type radius) 
    6868        { 
     
    7373        /** Returns the center of the bounding sphere. */ 
    7474        inline vec_type& center() { return _center; } 
    75          
     75 
    7676        /** Returns the const center of the bounding sphere. */ 
    7777        inline const vec_type& center() const { return _center; } 
     
    8181        /** Returns the const radius of the bounding sphere. */ 
    8282        inline value_type radius() const { return _radius; } 
    83          
     83 
    8484        /** Returns the squared length of the radius. Note, For performance 
    8585          * reasons, the calling method is responsible for checking to make 
     
    131131                   ((_center - bs._center).length2() <= (_radius + bs._radius)*(_radius + bs._radius)); 
    132132        } 
    133          
     133 
    134134}; 
    135135 
     
    188188        return; 
    189189    } 
    190      
    191      
    192     // Calculate d == The distance between the sphere centers    
     190 
     191 
     192    // Calculate d == The distance between the sphere centers 
    193193    double d = ( _center - sh.center() ).length(); 
    194194 
    195195    // New sphere is already inside this one 
    196     if ( d + sh.radius() <= _radius )   
     196    if ( d + sh.radius() <= _radius ) 
    197197    { 
    198198        return; 
    199199    } 
    200200 
    201     //  New sphere completely contains this one  
    202     if ( d + _radius <= sh.radius() )   
     201    //  New sphere completely contains this one 
     202    if ( d + _radius <= sh.radius() ) 
    203203    { 
    204204        _center = sh._center; 
     
    207207    } 
    208208 
    209      
     209 
    210210    // Build a new sphere that completely contains the other two: 
    211211    // 
     
    244244} 
    245245 
    246 template<typename VT>         
     246template<typename VT> 
    247247void BoundingSphereImpl<VT>::expandBy(const BoundingBoxImpl<VT>& bb) 
    248248{ 
     
    261261                newbb.expandBy(v); // add it into the new bounding box. 
    262262            } 
    263              
     263 
    264264            _center = newbb.center(); 
    265265            _radius = newbb.radius(); 
    266              
     266 
    267267        } 
    268268        else 
     
    300300        typedef BoundingSpheref BoundingSphere; 
    301301#else 
    302         typedef BoundingSphered BoundingSphere;         
     302        typedef BoundingSphered BoundingSphere; 
    303303#endif 
    304304}