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/osgParticle/SectorPlacer

    r11755 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*/ 
     
    2929 
    3030    /**     A sector-shaped particle placer. 
    31         This placer sets the initial position of incoming particle by choosing a random position  
    32         within a circular sector; this sector is defined by three parameters: a <I>center point</I>,  
    33         which is inherited directly from <CODE>osgParticle::CenteredPlacer</CODE>, a range of values  
    34         for <I>radius</I>, and a range of values for the <I>central angle</I> (sometimes called    <B>phi</B>).         
     31        This placer sets the initial position of incoming particle by choosing a random position 
     32        within a circular sector; this sector is defined by three parameters: a <I>center point</I>, 
     33        which is inherited directly from <CODE>osgParticle::CenteredPlacer</CODE>, a range of values 
     34        for <I>radius</I>, and a range of values for the <I>central angle</I> (sometimes called    <B>phi</B>). 
    3535    */ 
    3636    class SectorPlacer: public CenteredPlacer { 
     
    3838        inline SectorPlacer(); 
    3939        inline SectorPlacer(const SectorPlacer& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); 
    40          
     40 
    4141        /// Get the range of possible values for radius. 
    4242        inline const rangef& getRadiusRange() const; 
    43          
     43 
    4444        /// Set the range of possible values for radius. 
    4545        inline void setRadiusRange(const rangef& r); 
    46          
     46 
    4747        /// Set the range of possible values for radius. 
    4848        inline void setRadiusRange(float r1, float r2); 
    49          
     49 
    5050        /// Get the range of possible values for the central angle. 
    51         inline const rangef& getPhiRange() const;         
    52          
     51        inline const rangef& getPhiRange() const; 
     52 
    5353        /// Set the range of possible values for the central angle. 
    5454        inline void setPhiRange(const rangef& r); 
    55          
     55 
    5656        /// Set the range of possible values for the central angle. 
    57         inline void setPhiRange(float r1, float r2);     
     57        inline void setPhiRange(float r1, float r2); 
    5858 
    5959        META_Object(osgParticle, SectorPlacer); 
    60          
     60 
    6161        /// Place a particle. Do not call it manually. 
    6262        inline void place(Particle* P) const; 
     
    6464        /// return the area of the sector 
    6565        inline float volume() const; 
    66          
     66 
    6767        /// return the control position 
    6868        inline osg::Vec3 getControlPosition() const; 
     
    7070    protected: 
    7171        virtual ~SectorPlacer() {} 
    72         SectorPlacer& operator=(const SectorPlacer&) { return *this; }         
    73          
     72        SectorPlacer& operator=(const SectorPlacer&) { return *this; } 
     73 
    7474    private: 
    7575        rangef _rad_range; 
     
    7878 
    7979    // INLINE FUNCTIONS 
    80      
     80 
    8181    inline SectorPlacer::SectorPlacer() 
    8282    : CenteredPlacer(), _rad_range(0, 1), _phi_range(0, osg::PI*2) 
    8383    { 
    8484    } 
    85      
     85 
    8686    inline SectorPlacer::SectorPlacer(const SectorPlacer& copy, const osg::CopyOp& copyop) 
    8787    : CenteredPlacer(copy, copyop), _rad_range(copy._rad_range), _phi_range(copy._phi_range) 
    8888    { 
    8989    } 
    90      
     90 
    9191    inline const rangef& SectorPlacer::getRadiusRange() const 
    9292    { 
     
    103103        _rad_range = r; 
    104104    } 
    105      
     105 
    106106    inline void SectorPlacer::setRadiusRange(float r1, float r2) 
    107107    { 
     
    109109        _rad_range.maximum = r2; 
    110110    } 
    111      
     111 
    112112    inline void SectorPlacer::setPhiRange(const rangef& r) 
    113113    { 
    114114        _phi_range = r; 
    115115    } 
    116      
     116 
    117117    inline void SectorPlacer::setPhiRange(float r1, float r2) 
    118118    { 
     
    125125        float rad = _rad_range.get_random_sqrtf(); 
    126126        float phi = _phi_range.get_random(); 
    127          
     127 
    128128        osg::Vec3 pos( 
    129             getCenter().x() + rad * cosf(phi),  
    130             getCenter().y() + rad * sinf(phi),  
     129            getCenter().x() + rad * cosf(phi), 
     130            getCenter().y() + rad * sinf(phi), 
    131131            getCenter().z()); 
    132          
     132 
    133133        P->setPosition(pos); 
    134134    } 
    135      
     135 
    136136    inline float SectorPlacer::volume() const 
    137137    {