diff --git a/include/osgParticle/FluidProgram b/include/osgParticle/FluidProgram index 9a65f88b0..ab5350440 100644 --- a/include/osgParticle/FluidProgram +++ b/include/osgParticle/FluidProgram @@ -65,15 +65,15 @@ namespace osgParticle inline const osg::Vec3& getWind() const { return _wind; } /// Set the acceleration vector. - inline void setAcceleration(const osg::Vec3& v) { _viscosityCoefficientcceleration = v; } + inline void setAcceleration(const osg::Vec3& v) { _acceleration = v; } /// Get the acceleration vector. - inline const osg::Vec3& getAcceleration() const { return _viscosityCoefficientcceleration; } + inline const osg::Vec3& getAcceleration() const { return _acceleration; } /** Set the acceleration vector to the gravity on earth (0, 0, -9.81). The acceleration will be multiplied by the scale parameter. */ - inline void setToGravity(float scale = 1.0f) { _viscosityCoefficientcceleration.set(0, 0, -9.81f*scale); } + inline void setToGravity(float scale = 1.0f) { _acceleration.set(0, 0, -9.81f*scale); } /// Set the fluid parameters as for air (20°C temperature). inline void setFluidToAir() @@ -99,7 +99,7 @@ namespace osgParticle virtual void execute(double dt); - osg::Vec3 _viscosityCoefficientcceleration; + osg::Vec3 _acceleration; float _viscosity; float _density; osg::Vec3 _wind; diff --git a/src/osgParticle/FluidProgram.cpp b/src/osgParticle/FluidProgram.cpp index 5fabb9ebd..f228c8485 100644 --- a/src/osgParticle/FluidProgram.cpp +++ b/src/osgParticle/FluidProgram.cpp @@ -8,7 +8,7 @@ osgParticle::FluidProgram::FluidProgram(): osgParticle::FluidProgram::FluidProgram(const FluidProgram& copy, const osg::CopyOp& copyop): Program(copy, copyop), - _viscosityCoefficientcceleration(copy._viscosityCoefficientcceleration), + _acceleration(copy._acceleration), _viscosity(copy._viscosity), _density(copy._density), _wind(copy._wind), @@ -32,7 +32,7 @@ void osgParticle::FluidProgram::execute(double dt) float Volume = Area*radius*four_over_three; // compute force due to gravity + boyancy of displacing the fluid that the particle is emersed in. - osg::Vec3 force = _viscosityCoefficientcceleration * (particle->getMass() - _density*Volume); + osg::Vec3 force = _acceleration * (particle->getMass() - _density*Volume); // compute force due to friction osg::Vec3 relative_wind = particle->getVelocity()-_wind;