osgParticle::FluidProgram Class Reference

Inheritance diagram for osgParticle::FluidProgram:

osgParticle::Program osgParticle::ParticleProcessor osg::Node osg::Object osg::Referenced 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)
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 _densityCoefficeint

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

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.

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

Get the acceleration vector.

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

Get the density of the fluid.

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

Get the viscosity of the fluid.

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

Get the wind vector.

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

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

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

Set the acceleration vector.

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

Set the density of the fluid.

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

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

Set the viscosity of the fluid.

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::setWind ( const osg::Vec3 wind  )  [inline]

Set the wind vector.


Member Data Documentation

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

float osgParticle::FluidProgram::_density [protected]

float osgParticle::FluidProgram::_densityCoefficeint [protected]

float osgParticle::FluidProgram::_viscosity [protected]

float osgParticle::FluidProgram::_viscosityCoefficient [protected]

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


The documentation for this class was generated from the following file:
Generated on Sun Oct 1 13:17:12 2006 for openscenegraph by  doxygen 1.4.7