#include <ParticleSystem.h>
Inheritance diagram for GpuThesis::ParticleSystem:
Public Member Functions | |
ParticleSystem (unsigned int numParticles, const std::string &particleSplat, float splatThreshold, float domainScale, bool useVBO=true) | |
void | renderParticles () const |
void | readParticlePositions (float *positions) const |
void | setSpawnPositions (const std::vector< float > &positions) |
void | setSpawnVelocities (const std::vector< float > &velocities) |
void | setSpawnTimes (const std::vector< float > ×) |
void | setGravity (float gravity) |
void | setVisibilityThreshold (float visibilityThreshold) |
void | setMinimumLifeTime (float minimumLifeTime) |
float | getVisibilityThreshold () const |
float | getMinimumLifeTime () const |
void | setParticleSize (float size) |
float | getParticleSize () const |
unsigned int | getNumParticles () const |
OpenGL::TextureContainer * | getTextureContainer () const |
unsigned int | getBlendFunc () const |
void | setBlendFunc (unsigned int value) |
bool | getDrawBox () const |
void | setDrawBox (bool drawBox) |
void | advect (const Math::Vector3d &distance) |
Private Member Functions | |
void | doRun (float timestep) |
void | doReset () |
|
Constructs a standard particle system. The particle velocities are determined by the fluid velocity texture, and the particle colors by the fluid color texture.
|
|
Advect all particles.
|
|
Implemented by subclasses. Implements GpuThesis::Runnable. |
|
Implemented by subclasses.
Implements GpuThesis::Runnable. |
|
Returns the type of blend function used when rendering the particles.
|
|
Returns whether a box is drawn around the domain where the particle system operates.
|
|
Gets the minimum lifetime of the particles.
|
|
Returns the number of particles in the particle system.
|
|
Returns the particle size.
|
|
Returns the texture container containing the textures used by the particle system.
|
|
Gets the alpha threshold at which the particles will respawn.
|
|
Reads the particle positions into a float array.
|
|
Renders the particles to the screen based on their positions. |
|
Sets the type of blend function used when rendering the particles.
|
|
Sets whether a box should be drawn around the domain where the particle system operates.
|
|
Sets the gravity constant to be used in the particle system.
|
|
Sets the minimum lifetime of the particles.
|
|
Sets the particle size.
|
|
Sets the positions where the particles spawn. The position vector should be on the form (x, y, z) * numParticles.
|
|
Sets the particle spawn times. These times indicate the time from the particle system is initialized to the particles spawn. The time vector should be on the form (time) * numParticles.
|
|
Sets the velocities the particles should have when spawn. The velocity vector should be on the form (x, y, z) * numParticles.
|
|
Sets the alpha threshold at which the particles will respawn.
|