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

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

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

Set the density of the fluid.

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

Get the density of the fluid.

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

Set the viscosity of the fluid.

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

Get the viscosity of the fluid.

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

Set the wind vector.

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

Get the wind vector.

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

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

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

Get the overriden radius value.

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::operate ( Particle P,
double  dt 
) [virtual]

Apply the friction forces to a particle. Do not call this method manually.

Implements osgParticle::Operator.

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

Perform some initializations. Do not call this method manually.

Reimplemented from osgParticle::Operator.

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


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:43 2007 for the OpenSceneGraph by doxygen 1.5.3.