- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osgParticle::FluidFrictionOperator Class Reference

An operator that simulates the friction of a fluid. More...

Inheritance diagram for osgParticle::FluidFrictionOperator:

[legend]
List of all members.

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

## Detailed Description

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.

## Constructor & Destructor Documentation

osgParticle::FluidFrictionOperator::FluidFrictionOperator | ( |  | ) |

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

virtual osgParticle::FluidFrictionOperator::~FluidFrictionOperator | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

void osgParticle::FluidFrictionOperator::beginOperate | ( | Program * | prg | ) | `[inline, virtual]`

| Perform some initializations. Do not call this method manually. Reimplemented from osgParticle::Operator.

float osgParticle::FluidFrictionOperator::getFluidDensity | ( |  | ) | const`[inline]`

| Get the density of the fluid.

float osgParticle::FluidFrictionOperator::getFluidViscosity | ( |  | ) | const`[inline]`

| Get the viscosity of the fluid.

float osgParticle::FluidFrictionOperator::getOverrideRadius | ( |  | ) | const`[inline]`

| Get the overriden radius value.

osgParticle::FluidFrictionOperator::META_Object | ( | osgParticle | ,
|  | FluidFrictionOperator |
| ) |

void osgParticle::FluidFrictionOperator::operate | ( | Particle * | P,
|  | double | dt
| ) | `[virtual]`

| Apply the friction forces to a particle. Do not call this method manually. Implements osgParticle::Operator.

FluidFrictionOperator& osgParticle::FluidFrictionOperator::operator= | ( | const FluidFrictionOperator & |  | ) | `[inline, protected]`

void osgParticle::FluidFrictionOperator::setFluidDensity | ( | float | d | ) | `[inline]`

| Set the density of the fluid.

void osgParticle::FluidFrictionOperator::setFluidToAir | ( |  | ) | `[inline]`

| Set the fluid parameters as for air (20°C temperature).

void osgParticle::FluidFrictionOperator::setFluidToWater | ( |  | ) | `[inline]`

| Set the fluid parameters as for pure water (20°C temperature).

void osgParticle::FluidFrictionOperator::setFluidViscosity | ( | float | v | ) | `[inline]`

| Set the viscosity of the fluid.

void osgParticle::FluidFrictionOperator::setOverrideRadius | ( | float | r | ) | `[inline]`

| Set the overriden radius value (pass 0 if you want to use particle's radius).

The documentation for this class was generated from the following files:

- FluidFrictionOperator
- FluidFrictionOperator.cpp