#include <FireSprite.h>
Inheritance diagram for FireSprite:
Public Member Functions | |
| FireSprite (long nmemb=1000, float flameSize[]=NULL, float time=1.0) | |
| Create a new fire sprite. | |
| virtual | ~FireSprite () |
| Delete this sprite but do not remove it from any lists. | |
| virtual void | paint () |
| Draw this sprite on screen. | |
| virtual void | update () |
| Update this sprite's pysics and stuff. | |
Static Public Attributes | |
| static TexID | fireTexture |
| Texture used for fire particles. | |
Protected Member Functions | |
| virtual void | resetParticle (Particle &p) |
Protected Attributes | |
| Particle * | particles |
| long | particleCount |
| Number of particles to use. | |
| float | totalTime |
| The total time this system has been run. | |
| GLfloat | size [3] |
| x,y,z size of flame | |
| float | reviveTime |
| The total time to regenerate the flame. | |
| float | maxAge |
| char | texRsrcKey [32] |
| FireSprite::FireSprite | ( | long | nmemb = 1000, |
|
| float | flameSize[] = NULL, |
|||
| float | time = 1.0 | |||
| ) |
Create a new fire sprite.
Load resources if needed.
| nmemb | number of flame particels | |
| flameSize | width, depth and height of the flame. NULL for default values | |
| time | The maximum time each particle lives, this controlls the intensity of the flame. |
| virtual FireSprite::~FireSprite | ( | ) | [virtual] |
Delete this sprite but do not remove it from any lists.
| virtual void FireSprite::paint | ( | ) | [virtual] |
Draw this sprite on screen.
The paint method is allowed to change the model-view matrix and any pushable attributes.
Implements Sprite.
| virtual void FireSprite::resetParticle | ( | Particle & | p | ) | [protected, virtual] |
| virtual void FireSprite::update | ( | ) | [virtual] |
Update this sprite's pysics and stuff.
Note that the update method should use the static dTime variable to check the time since last invokation. The caller is responsible for setting this variable to an apropriate value!
Implements Sprite.
TexID FireSprite::fireTexture [static] |
Texture used for fire particles.
float FireSprite::maxAge [protected] |
long FireSprite::particleCount [protected] |
Number of particles to use.
Particle* FireSprite::particles [protected] |
float FireSprite::reviveTime [protected] |
The total time to regenerate the flame.
GLfloat FireSprite::size[3] [protected] |
x,y,z size of flame
char FireSprite::texRsrcKey[32] [protected] |
float FireSprite::totalTime [protected] |
The total time this system has been run.
1.4.7