FireSprite Class Reference

A slow burning fire to use for instance to show a borken tank. More...

#include <FireSprite.h>

Inheritance diagram for FireSprite:

Inheritance graph
[legend]
Collaboration diagram for FireSprite:

Collaboration graph
[legend]
List of all members.

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

Particleparticles
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]

Detailed Description

A slow burning fire to use for instance to show a borken tank.


Constructor & Destructor Documentation

FireSprite::FireSprite ( long  nmemb = 1000,
float  flameSize[] = NULL,
float  time = 1.0 
)

Create a new fire sprite.

Load resources if needed.

Parameters:
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.


Member Function Documentation

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.


Member Data Documentation

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.


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7