#include <Particle.h>
Inheritance diagram for ParticleSystems::Particle:
Public Member Functions | |
Particle (int sysId, Solver *sol) | |
The minimal Constructor. | |
Particle (int sysId, Solver *sol, GraphicsLib::Point3 pos, GraphicsLib::Vector vel, GraphicsLib::Colour c, GraphicsLib::Colour fc, GLfloat size, GLfloat fsize, GLfloat maxLife) | |
The main Constructor. | |
Particle (int sysId, GraphicsLib::Point3 pos, GraphicsLib::Vector vel, GraphicsLib::Colour c, GLfloat trans, float b, float ma, float mo, float e, float s) | |
The Collision Constructor. | |
virtual | ~Particle () |
The Destructor. | |
virtual void | draw ()=0 |
An abstract Function. | |
virtual void | update ()=0 |
An abstract Function. | |
virtual bool | isDead ()=0 |
An abstract Function. | |
Public Attributes | |
GLfloat | life |
A public Variable. | |
GLfloat | MAXLIFE |
A public Variable. | |
int | SYSID |
A public Variable. | |
Solver * | solv |
A public Variable. | |
GraphicsLib::Point3 | position |
A public Variable. | |
GraphicsLib::Point3 | old_Position |
A public Variable. | |
GraphicsLib::Vector | velocity |
A public Variable. | |
GraphicsLib::Vector | accel |
A public Variable. | |
GraphicsLib::Colour | colour |
A public Variable. | |
GraphicsLib::Colour | faded_colour |
A public Variable. | |
GLfloat | transparency |
A public Variable. | |
float | bounce |
A public Variable. | |
float | mass |
A public Variable. | |
float | momentum |
A public Variable. | |
float | energy |
A public Variable. | |
GLfloat | size |
A public Variable. | |
GLfloat | flare_size |
A public Variable. | |
bool | dead |
A public Variable. |
The Particle Class is the Superclass for all Particles. It provides Constructors as well as abstract methods that need to be implemented by all Subclasses.
Definition at line 33 of file Particle.h.
|
The minimal Constructor. This Constructor only takes the ParticleSystem ID and the Solver to update the Particles position.
Definition at line 61 of file Particle.cpp. References colour, dead, MAXLIFE, old_Position, position, size, solv, SYSID, and velocity. |
|
The main Constructor. This Constructor is the main Constructor for a Particle. It sets the most important attributes of a Particle.
Definition at line 35 of file Particle.cpp. References bounce, colour, dead, faded_colour, flare_size, MAXLIFE, old_Position, position, size, solv, SYSID, and velocity. |
|
The Collision Constructor. A Constructor to set attributes that are needed for Collision
Definition at line 11 of file Particle.cpp. References bounce, colour, dead, energy, mass, momentum, position, size, SYSID, transparency, and velocity. |
|
The Destructor. Destructs the Particle Definition at line 73 of file Particle.cpp. |
|
An abstract Function. Draws the Particle Implemented in ParticleSystems::ImgParticle, ParticleSystems::PointParticle, and ParticleSystems::StrikeParticle. |
|
An abstract Function. Returns true if the Particle is dead
Implemented in ParticleSystems::ImgParticle, ParticleSystems::PointParticle, and ParticleSystems::StrikeParticle. |
|
An abstract Function. Updates a Particles Implemented in ParticleSystems::ImgParticle, ParticleSystems::PointParticle, and ParticleSystems::StrikeParticle. |
|
A public Variable. The acceleration of the Particle Definition at line 169 of file Particle.h. |
|
A public Variable. The bouncyness of the Particle when colliding Definition at line 194 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The colour of the Particle Definition at line 175 of file Particle.h. Referenced by Particle(), ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |
|
A public Variable. Specifies if the Particle is dead True if Particle is dead Definition at line 232 of file Particle.h. Referenced by Particle(), ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |
|
A public Variable. The energy of the Particle Definition at line 212 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The fade colour of the Particle If set to zero nothing happens Definition at line 182 of file Particle.h. Referenced by Particle(), ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |
|
A public Variable. The amount the Particle gets reduced each update. If set to zero nothing happens. Definition at line 225 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The current life of the Particle Definition at line 127 of file Particle.h. Referenced by ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |
|
A public Variable. The Mass of the Particle Definition at line 200 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The Maximum Lifespan of the Particle Definition at line 133 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The momentum of the Particle Definition at line 206 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The old_Position of the Particle Definition at line 157 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The current position of the Particle Definition at line 151 of file Particle.h. Referenced by Particle(), ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |
|
A public Variable. The size of the Particle Definition at line 218 of file Particle.h. Referenced by Particle(), ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |
|
A public Variable. The Solver for this Particle to update the Particles position Definition at line 145 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The ParticleSystem ID this Particle belongs to Definition at line 139 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The transparency of the Particle Definition at line 188 of file Particle.h. Referenced by Particle(). |
|
A public Variable. The speed of the Particle Definition at line 163 of file Particle.h. Referenced by Particle(), ParticleSystems::PointEmitter::reBirth(), and ParticleSystems::PlanarEmitter::reBirth(). |