Particle simulation / rendering. More...
#include <gelParticle.h>
Public Member Functions | |
GelParticleSys () | |
Default constructor. | |
GelParticleSys (const char *desc_name) | |
Convenience constructor. | |
~GelParticleSys () | |
Destructor. | |
Gel2dVec | getLoc () const |
Gets the location of particle emission. | |
void | setLoc (Gel2dVec loc) |
Sets the location of particle emission. | |
void | fire () |
Fires the particle system. | |
void | setTexture (GelTexture *tex) |
Sets the particle system's texture. | |
void | mapRect (const Gel2dVec &pos, const Gel2dVec &size) |
int | writeDesc (const char *filename) |
Writes a particle system description file to disk. | |
int | readDesc (const char *filename) |
Reads a particle system description file from disk. | |
void | update () |
Updates the particle system simulation. | |
void | render () |
Renders the particle system to the screen. | |
Public Attributes | |
int | emissionRate |
bool | infiniteSysLife |
float | sysLife |
Gel2dVec | originDis |
float | direction |
float | spread |
float | minLife |
float | maxLife |
float | minSpeed |
float | maxSpeed |
float | minGravity |
float | maxGravity |
float | minRadialAccel |
float | maxRadialAccel |
float | minTangetAccel |
float | maxTangetAccel |
float | startSize |
float | endSize |
float | randSize |
float | parRot |
float | randRot |
float | startAlpha |
float | endAlpha |
float | randAlpha |
GelColor | minStartCol |
GelColor | maxStartCol |
GelColor | minEndCol |
GelColor | maxEndCol |
GelColor | randCol |
Gel2dVec | uv [4] |
Particle simulation / rendering.
gel::GelParticleSys::GelParticleSys | ( | ) |
Default constructor.
gel::GelParticleSys::GelParticleSys | ( | const char * | desc_name | ) |
Convenience constructor.
Reads a particle system description file from disk.
desc_name | : The directory / name of a Gel2D Particle System description file. |
gel::GelParticleSys::~GelParticleSys | ( | ) |
Destructor.
Gel2dVec gel::GelParticleSys::getLoc | ( | ) | const [inline] |
Gets the location of particle emission.
void gel::GelParticleSys::setLoc | ( | Gel2dVec | loc | ) | [inline] |
Sets the location of particle emission.
This is the location at which any subsequent particles will be emitted.
This is the way you will want to move particle systems, as opposed to using setPos(), which will translate the position of the entire system, existing particles and all. Not pretty.
loc | : The particle emission location. |
void gel::GelParticleSys::fire | ( | ) | [inline] |
Fires the particle system.
This function resets the system's age to zero.
void gel::GelParticleSys::setTexture | ( | GelTexture * | tex | ) |
Sets the particle system's texture.
tex | : The particle system's new texture. |
int gel::GelParticleSys::writeDesc | ( | const char * | filename | ) |
Writes a particle system description file to disk.
filename | : The directory / name of the description file. |
int gel::GelParticleSys::readDesc | ( | const char * | filename | ) |
Reads a particle system description file from disk.
filename | : The directory / name of the description file. |
void gel::GelParticleSys::update | ( | ) |
Updates the particle system simulation.
This must be called somewhere in your game loop.
void gel::GelParticleSys::render | ( | ) | [virtual] |
Renders the particle system to the screen.
Reimplemented from gel::GelObject.
API Documentation by Mark D. Procarione | Generated by |