![]() |
VR-Forces 5.0.2 Developer's Guide
|
Customized OpenSceneGraph particle system operator Rewritten from default fluid friction operator to use correct physics-based approximations.

Public Member Functions | |
| DtOsgFluidFrictionOperator () | |
| DtOsgFluidFrictionOperator (const DtOsgFluidFrictionOperator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| META_Object (makVrv, DtOsgFluidFrictionOperator) | |
| void | setFluidDensity (float d) |
| float | getFluidDensity () const |
| void | setFluidViscosity (float v) |
| float | getFluidViscosity () const |
| void | setWind (const osg::Vec3 &wind) |
| const osg::Vec3 & | getWind () const |
| void | setUp (const osg::Vec3 &up) |
| const osg::Vec3 & | getUp () const |
| void | setOverrideRadius (float r) |
| float | getOverrideRadius () const |
| void | setFluidToAir () |
| void | setFluidToWater () |
| void | operate (osgParticle::Particle *P, double dt) |
| void | beginOperate (osgParticle::Program *prg) |
Static Public Member Functions | |
| static DtOsgFluidFrictionOperator * | fromOsgFluidFrictionOperator (osgParticle::FluidFrictionOperator *osgOp) |
Protected Member Functions | |
| virtual | ~DtOsgFluidFrictionOperator () |
| DtOsgFluidFrictionOperator & | operator= (const DtOsgFluidFrictionOperator &) |
Private Attributes | |
| float | viscosityCoefficient |
| float | densityCoefficient |
| float | _density |
| float | _viscosity |
| float | _ovr_rad |
| osg::Vec3 | _wind |
| osg::Vec3 | _up |
| osgParticle::Program * | _current_program |
| makVrv::DtOsgFluidFrictionOperator::DtOsgFluidFrictionOperator | ( | ) |
CTOR.
| makVrv::DtOsgFluidFrictionOperator::DtOsgFluidFrictionOperator | ( | const DtOsgFluidFrictionOperator & | copy, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Copy CTOR.
|
inlineprotectedvirtual |
|
static |
Generate a fluid friction operator from the osg version.
| makVrv::DtOsgFluidFrictionOperator::META_Object | ( | makVrv | , |
| DtOsgFluidFrictionOperator | |||
| ) |
| void makVrv::DtOsgFluidFrictionOperator::setFluidDensity | ( | float | d | ) |
Set the density of the fluid.
| float makVrv::DtOsgFluidFrictionOperator::getFluidDensity | ( | ) | const |
Get the density of the fluid.
| void makVrv::DtOsgFluidFrictionOperator::setFluidViscosity | ( | float | v | ) |
Set the viscosity of the fluid.
| float makVrv::DtOsgFluidFrictionOperator::getFluidViscosity | ( | ) | const |
Get the viscosity of the fluid.
|
inline |
Set the wind vector.
|
inline |
Get the wind vector.
|
inline |
Set the up vector.
|
inline |
Get the up vector.
| void makVrv::DtOsgFluidFrictionOperator::setOverrideRadius | ( | float | r | ) |
Set the overriden radius value (pass 0 if you want to use particle's radius).
| float makVrv::DtOsgFluidFrictionOperator::getOverrideRadius | ( | ) | const |
Get the overriden radius value.
| void makVrv::DtOsgFluidFrictionOperator::setFluidToAir | ( | ) |
Set the fluid parameters as for air (20°C temperature).
| void makVrv::DtOsgFluidFrictionOperator::setFluidToWater | ( | ) |
Set the fluid parameters as for pure water (20°C temperature).
| void makVrv::DtOsgFluidFrictionOperator::operate | ( | osgParticle::Particle * | P, |
| double | dt | ||
| ) |
Apply the friction forces to a particle. Do not call this method manually.
| void makVrv::DtOsgFluidFrictionOperator::beginOperate | ( | osgParticle::Program * | prg | ) |
Perform some initializations. Do not call this method manually.
|
inlineprotected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |