15#ifndef OSGPARTICLE_FLUIDFRICTIONOPERATOR
16#define OSGPARTICLE_FLUIDFRICTIONOPERATOR 1
63 inline void setOverrideRadius(
float r);
66 inline float getOverrideRadius()
const;
69 inline void setFluidToAir();
72 inline void setFluidToWater();
109 _coeff_B = 0.2f *
osg::PI * _density;
115 _coeff_A = 6 *
osg::PI * _viscosity;
142 _current_program = prg;
Vec3f Vec3
Definition Vec3:21
const double PI
Definition Math:30
The osgParticle library is a NodeKit that extends the core scene graph to support particle effects.
Definition AccelOperator:27
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
void setFluidToWater()
Set the fluid parameters as for pure water (20°C temperature).
Definition FluidFrictionOperator:124
float getOverrideRadius() const
Get the overriden radius value.
Definition FluidFrictionOperator:130
float getFluidViscosity() const
Get the viscosity of the fluid.
Definition FluidFrictionOperator:101
virtual ~FluidFrictionOperator()
Definition FluidFrictionOperator:81
const osg::Vec3 & getWind() const
Get the wind vector.
Definition FluidFrictionOperator:60
FluidFrictionOperator(const FluidFrictionOperator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
void setWind(const osg::Vec3 &wind)
Set the wind vector.
Definition FluidFrictionOperator:57
void setOverrideRadius(float r)
Set the overriden radius value (pass 0 if you want to use particle's radius).
Definition FluidFrictionOperator:135
FluidFrictionOperator & operator=(const FluidFrictionOperator &)
Definition FluidFrictionOperator:82
void operate(Particle *P, double dt)
Apply the friction forces to a particle. Do not call this method manually.
void setFluidViscosity(float v)
Set the viscosity of the fluid.
Definition FluidFrictionOperator:112
void beginOperate(Program *prg)
Perform some initializations. Do not call this method manually.
Definition FluidFrictionOperator:140
float getFluidDensity() const
Get the density of the fluid.
Definition FluidFrictionOperator:96
void setFluidToAir()
Set the fluid parameters as for air (20°C temperature).
Definition FluidFrictionOperator:118
META_Object(osgParticle, FluidFrictionOperator)
void setFluidDensity(float d)
Set the density of the fluid.
Definition FluidFrictionOperator:106
Operator()
Definition Operator:92
Implementation of a particle.
Definition Particle:47
An abstract ParticleProcessor descendant for modifying particles "on the fly" during the cull travers...
Definition Program:36
#define OSGPARTICLE_EXPORT
Definition Export:40