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/FluidFrictionOperator

    r5328 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*/ 
     
    2626{ 
    2727 
    28     class Particle;     
     28    class Particle; 
    2929 
    3030    /**    An operator that simulates the friction of a fluid. 
    3131        By using this operator you can let the particles move in a fluid of a given <I>density</I> 
    3232        and <I>viscosity</I>. There are two functions to quickly setup the parameters for pure water 
    33         and air. You can decide whether to compute the forces using the particle's physical  
     33        and air. You can decide whether to compute the forces using the particle's physical 
    3434        radius or another value, by calling the <CODE>setOverrideRadius()</CODE> method. 
    3535    */ 
    3636    class OSGPARTICLE_EXPORT FluidFrictionOperator: public Operator { 
    3737    public: 
    38          
     38 
    3939        FluidFrictionOperator(); 
    4040        FluidFrictionOperator(const FluidFrictionOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); 
    41          
     41 
    4242        META_Object(osgParticle, FluidFrictionOperator); 
    43                 
     43 
    4444        /// Set the density of the fluid. 
    4545        inline void setFluidDensity(float d); 
     
    4747        /// Get the density of the fluid. 
    4848        inline float getFluidDensity() const; 
    49          
     49 
    5050        /// Set the viscosity of the fluid. 
    5151        inline void setFluidViscosity(float v); 
    52          
     52 
    5353        /// Get the viscosity of the fluid. 
    5454        inline float getFluidViscosity() const; 
    55          
     55 
    5656        /// Set the wind vector. 
    5757        inline void setWind(const osg::Vec3& wind) { _wind = wind; } 
    58          
     58 
    5959        /// Get the wind vector. 
    6060        inline const osg::Vec3& getWind() const { return _wind; } 
    61                 
     61 
    6262        /// Set the overriden radius value (pass 0 if you want to use particle's radius). 
    6363        inline void setOverrideRadius(float r); 
    6464 
    6565        /// Get the overriden radius value. 
    66         inline float getOverrideRadius() const;         
    67          
     66        inline float getOverrideRadius() const; 
     67 
    6868        /// Set the fluid parameters as for air (20°C temperature). 
    6969        inline void setFluidToAir(); 
    70          
     70 
    7171        /// Set the fluid parameters as for pure water (20°C temperature). 
    7272        inline void setFluidToWater(); 
    73          
     73 
    7474        /// Apply the friction forces to a particle. Do not call this method manually. 
    7575        void operate(Particle* P, double dt); 
    76          
     76 
    7777        /// Perform some initializations. Do not call this method manually. 
    7878        inline void beginOperate(Program* prg); 
    79          
     79 
    8080    protected: 
    8181        virtual ~FluidFrictionOperator() {} 
    8282        FluidFrictionOperator &operator=(const FluidFrictionOperator &) { return *this; } 
    83          
     83 
    8484    private: 
    8585        float       _coeff_A; 
     
    9191        Program*    _current_program; 
    9292    }; 
    93      
     93 
    9494    // INLINE FUNCTIONS 
    95      
     95 
    9696    inline float FluidFrictionOperator::getFluidDensity() const 
    9797    { 
     
    103103        return _viscosity; 
    104104    } 
    105      
     105 
    106106    inline void FluidFrictionOperator::setFluidDensity(float d) 
    107107    { 
     
    115115        _coeff_A = 6 * osg::PI * _viscosity; 
    116116    } 
    117      
     117 
    118118    inline void FluidFrictionOperator::setFluidToAir() 
    119119    { 
     
    127127        setFluidDensity(1.0f); 
    128128    } 
    129      
     129 
    130130    inline float FluidFrictionOperator::getOverrideRadius() const 
    131131    { 
    132132        return _ovr_rad; 
    133133    } 
    134      
     134 
    135135    inline void FluidFrictionOperator::setOverrideRadius(float r) 
    136136    { 
    137137        _ovr_rad = r; 
    138138    } 
    139      
     139 
    140140    inline void FluidFrictionOperator::beginOperate(Program* prg) 
    141141    {