## class OSGPARTICLE_EXPORT osgParticle::FluidFrictionOperator

> An operator that simulates the friction of a fluid.

## Inheritance:

### Public Methods

FluidFrictionOperator()
FluidFrictionOperator(const FluidFrictionOperator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY)
META_Object(osgParticle, FluidFrictionOperator)
void operate(Particle* P, double dt)
  Apply the friction forces to a particle.
inline float getFluidDensity() const
  Get the density of the fluid
inline float getFluidViscosity() const
  Get the viscosity of the fluid
inline void setFluidDensity(float d)
  Set the density of the fluid
inline void setFluidViscosity(float v)
  Set the viscosity of the fluid
inline void setFluidToAir()
  Set the fluid parameters as for air (20°C temperature)
inline void setFluidToWater()
  Set the fluid parameters as for pure water (20°C temperature)
inline float getOverrideRadius() const
  Get the overriden radius value
inline void setOverrideRadius(float r)
  Set the overriden radius value (pass 0 if you want to use particle's radius)
inline void beginOperate(Program* prg)
  Perform some initializations.

### Protected Methods

virtual ~FluidFrictionOperator()
FluidFrictionOperator& operator=(const FluidFrictionOperator &)

### Inherited from Operator:

### Public Methods

virtual const char* libraryName() const
virtual const char* className() const
virtual bool isSameKindAs(const osg::Object* obj) const
virtual void endOperate()
inline bool isEnabled() const
inline void setEnabled(bool v)

## Documentation

> An operator that simulates the friction of a fluid. By using this operator you can let the particles move in a fluid of a given density and viscosity. There are two functions to quickly setup the parameters for pure water and air. You can decide whether to compute the forces using the particle's physical radius or another value, by calling the `setOverrideRadius()` method.

`FluidFrictionOperator()`

`FluidFrictionOperator(const FluidFrictionOperator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY)`

`META_Object(osgParticle, FluidFrictionOperator)`

`void operate(Particle* P, double dt)`
  Apply the friction forces to a particle. Do not call this method manually.

`virtual ~FluidFrictionOperator()`

`FluidFrictionOperator& operator=(const FluidFrictionOperator &)`

`inline float getFluidDensity() const`
  Get the density of the fluid

`inline float getFluidViscosity() const`
  Get the viscosity of the fluid

`inline void setFluidDensity(float d)`
  Set the density of the fluid

`inline void setFluidViscosity(float v)`
  Set the viscosity of the fluid

`inline void setFluidToAir()`
  Set the fluid parameters as for air (20°C temperature)

`inline void setFluidToWater()`
  Set the fluid parameters as for pure water (20°C temperature)

`inline float getOverrideRadius() const`
  Get the overriden radius value

`inline void setOverrideRadius(float r)`
  Set the overriden radius value (pass 0 if you want to use particle's radius)

`inline void beginOperate(Program* prg)`
  Perform some initializations. Do not call this method manually.

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.