osgParticle::FluidProgram Class Reference

A program class for performing operations on particles using a sequence of operators. More...

Inheritance diagram for osgParticle::FluidProgram:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 FluidProgram ()
 FluidProgram (const FluidProgram &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgParticle, FluidProgram)
void setFluidViscosity (float v)
 Set the viscosity of the fluid.
float getFluidViscosity () const
 Get the viscosity of the fluid.
void setFluidDensity (float d)
 Set the density of the fluid.
float getFluidDensity () const
 Get the density of the fluid.
void setWind (const osg::Vec3 &wind)
 Set the wind vector.
const osg::Vec3getWind () const
 Get the wind vector.
void setAcceleration (const osg::Vec3 &v)
 Set the acceleration vector.
const osg::Vec3getAcceleration () const
 Get the acceleration vector.
void setToGravity (float scale=1.0f)
 Set the acceleration vector to the gravity on earth (0, 0, -9.81).
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).

Protected Member Functions

virtual ~FluidProgram ()
FluidProgramoperator= (const FluidProgram &)
virtual void execute (double dt)
 Execute the program on the particle system. Must be overriden in descendant classes.

Protected Attributes

osg::Vec3 _acceleration
float _viscosity
float _density
osg::Vec3 _wind
float _viscosityCoefficient
float _densityCoefficient


Detailed Description

A program class for performing operations on particles using a sequence of operators.

To use a FluidProgram you have to create some Operator objects and add them to the program. All operators will be applied to each particle in the same order they've been added to the program.


Constructor & Destructor Documentation

osgParticle::FluidProgram::FluidProgram (  ) 

osgParticle::FluidProgram::FluidProgram ( const FluidProgram copy,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)

virtual osgParticle::FluidProgram::~FluidProgram (  )  [inline, protected, virtual]


Member Function Documentation

osgParticle::FluidProgram::META_Node ( osgParticle  ,
FluidProgram   
)

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

Set the viscosity of the fluid.

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

Get the viscosity of the fluid.

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

Set the density of the fluid.

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

Get the density of the fluid.

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

Set the wind vector.

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

Get the wind vector.

void osgParticle::FluidProgram::setAcceleration ( const osg::Vec3 v  )  [inline]

Set the acceleration vector.

const osg::Vec3& osgParticle::FluidProgram::getAcceleration (  )  const [inline]

Get the acceleration vector.

void osgParticle::FluidProgram::setToGravity ( float  scale = 1.0f  )  [inline]

Set the acceleration vector to the gravity on earth (0, 0, -9.81).

The acceleration will be multiplied by the scale parameter.

void osgParticle::FluidProgram::setFluidToAir (  )  [inline]

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

void osgParticle::FluidProgram::setFluidToWater (  )  [inline]

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

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

virtual void osgParticle::FluidProgram::execute ( double  dt  )  [protected, virtual]

Execute the program on the particle system. Must be overriden in descendant classes.

Implements osgParticle::Program.


Member Data Documentation

osg::Vec3 osgParticle::FluidProgram::_acceleration [protected]

float osgParticle::FluidProgram::_viscosity [protected]

float osgParticle::FluidProgram::_density [protected]

osg::Vec3 osgParticle::FluidProgram::_wind [protected]

float osgParticle::FluidProgram::_viscosityCoefficient [protected]

float osgParticle::FluidProgram::_densityCoefficient [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.