Inheritance diagram for osgParticle::FluidProgram:
Public Member Functions | |
FluidProgram () | |
FluidProgram (const FluidProgram ©, const osg::CopyOp ©op=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::Vec3 & | getWind () const |
Get the wind vector. | |
void | setAcceleration (const osg::Vec3 &v) |
Set the acceleration vector. | |
const osg::Vec3 & | getAcceleration () 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 () |
FluidProgram & | operator= (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 |
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.
|
|
|
|
|
|
|
Execute the program on the particle system. Must be overriden in descendant classes.
Implements osgParticle::Program. |
|
Get the acceleration vector.
|
|
Get the density of the fluid.
|
|
Get the viscosity of the fluid.
|
|
Get the wind vector.
|
|
|
|
|
|
Set the acceleration vector.
|
|
Set the density of the fluid.
|
|
Set the fluid parameters as for air (20°C temperature).
|
|
Set the fluid parameters as for pure water (20°C temperature).
|
|
Set the viscosity of the fluid.
|
|
Set the acceleration vector to the gravity on earth (0, 0, -9.81).
The acceleration will be multiplied by the |
|
Set the wind vector.
|
|
|
|
|
|
|
|
|
|
|
|
|