Fixed typo
This commit is contained in:
parent
a54a3b2bfb
commit
0d8bd24250
@ -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 <CODE>scale</CODE> 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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user