PxParticleFluid Class Reference
[Particles]
The particle fluid class represents the main module for particle based fluid simulation. SPH (Smoothed Particle Hydrodynamics) is used to animate the particles. This class inherits the properties of the PxParticleBase class and adds particle-particle interactions.
More...
#include <PxParticleFluid.h>
![Inheritance graph](classPxParticleFluid__inherit__graph.png)
![Collaboration graph](classPxParticleFluid__coll__graph.png)
Public Member Functions | |
virtual const char * | getConcreteTypeName () const |
returns string name of dynamic type. | |
Particle Access and Manipulation | |
virtual PxParticleFluidReadData * | lockParticleFluidReadData ()=0 |
Locks the particle data and provides the data descriptor for accessing the particles including fluid particle densities. | |
Particle Fluid Parameters | |
virtual PxReal | getStiffness () const =0 |
Returns the fluid stiffness. | |
virtual void | setStiffness (PxReal stiffness)=0 |
Sets the fluid stiffness (must be positive). | |
virtual PxReal | getViscosity () const =0 |
Returns the fluid viscosity. | |
virtual void | setViscosity (PxReal viscosity)=0 |
Sets the fluid viscosity (must be positive). | |
Particle Fluid Property Read Back | |
virtual PxReal | getRestParticleDistance () const =0 |
Returns the typical distance of particles in the relaxed state of the fluid. | |
Particle Fluid Parameters | |
virtual void | setRestParticleDistance (PxReal restParticleDistance)=0 |
Sets the typical distance of particles in the relaxed state of the fluid. | |
Protected Member Functions | |
PxParticleFluid (PxRefResolver &v) | |
PX_INLINE | PxParticleFluid () |
virtual | ~PxParticleFluid () |
virtual bool | isKindOf (const char *name) const |
Detailed Description
The particle fluid class represents the main module for particle based fluid simulation. SPH (Smoothed Particle Hydrodynamics) is used to animate the particles. This class inherits the properties of the PxParticleBase class and adds particle-particle interactions.There are two kinds of particle interaction forces which govern the behaviour of the fluid:
- Pressure forces: These forces result from particle densities higher than the "rest density" of the fluid. The rest density is given by specifying the inter-particle distance at which the fluid is in its relaxed state. Particles which are closer than the rest spacing are pushed away from each other.
- Viscosity forces: These forces act on neighboring particles depending on the difference of their velocities. Particles drag other particles with them which is used to simulate the viscous behaviour of the fluid.
For a good introduction to SPH fluid simulation, see http://www.matthiasmueller.info/publications/sca03.pdf
- See also:
- PxParticleBase, PxParticleFluidReadData
Constructor & Destructor Documentation
PxParticleFluid::PxParticleFluid | ( | PxRefResolver & | v | ) | [inline, protected] |
PX_INLINE PxParticleFluid::PxParticleFluid | ( | ) | [inline, protected] |
virtual PxParticleFluid::~PxParticleFluid | ( | ) | [inline, protected, virtual] |
Member Function Documentation
virtual const char* PxParticleFluid::getConcreteTypeName | ( | ) | const [inline, virtual] |
returns string name of dynamic type.
- Returns:
- class name of most derived type of this object.
Reimplemented from PxSerializable.
virtual PxReal PxParticleFluid::getRestParticleDistance | ( | ) | const [pure virtual] |
Returns the typical distance of particles in the relaxed state of the fluid.
- Returns:
- Rest particle distance.
virtual PxReal PxParticleFluid::getStiffness | ( | ) | const [pure virtual] |
Returns the fluid stiffness.
- Returns:
- The fluid stiffness.
virtual PxReal PxParticleFluid::getViscosity | ( | ) | const [pure virtual] |
Returns the fluid viscosity.
- Returns:
- The viscosity of the fluid.
virtual bool PxParticleFluid::isKindOf | ( | const char * | name | ) | const [inline, protected, virtual] |
virtual PxParticleFluidReadData* PxParticleFluid::lockParticleFluidReadData | ( | ) | [pure virtual] |
Locks the particle data and provides the data descriptor for accessing the particles including fluid particle densities.
virtual void PxParticleFluid::setRestParticleDistance | ( | PxReal | restParticleDistance | ) | [pure virtual] |
Sets the typical distance of particles in the relaxed state of the fluid.
- Parameters:
-
restParticleDistance The new restParticleDistance of the fluid.
virtual void PxParticleFluid::setStiffness | ( | PxReal | stiffness | ) | [pure virtual] |
Sets the fluid stiffness (must be positive).
- Parameters:
-
stiffness The new fluid stiffness.
virtual void PxParticleFluid::setViscosity | ( | PxReal | viscosity | ) | [pure virtual] |
Sets the fluid viscosity (must be positive).
- Parameters:
-
viscosity The new viscosity of the fluid.
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com