Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

osgParticle::FluidFrictionOperator Class Reference

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

Inheritance diagram for osgParticle::FluidFrictionOperator:

Inheritance graph
[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)
void setFluidDensity (float d)
 Set the density of the fluid.

float getFluidDensity () const
 Get the density of the fluid.

void setFluidViscosity (float v)
 Set the viscosity of the fluid.

float getFluidViscosity () const
 Get the viscosity of the fluid.

void setWind (const osg::Vec3 &wind)
 Set the wind vector.

const osg::Vec3getWind () const
 Get the wind vector.

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

float getOverrideRadius () const
 Get the overriden radius value.

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 ()
FluidFrictionOperatoroperator= (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.

const osg::Vec3& osgParticle::FluidFrictionOperator::getWind  )  const [inline]
 

Get the wind vector.

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).

void osgParticle::FluidFrictionOperator::setWind const osg::Vec3 wind  )  [inline]
 

Set the wind vector.


The documentation for this class was generated from the following file:
Generated at Thu Nov 24 16:25:11 2005 for the OpenSceneGraph by doxygen 1.3.6.