Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Explosion Class Reference

#include <Explosion.h>

List of all members.

Public Member Functions

 Explosion ()
 Explosion (Vec3 pos, float power=1.0f, bool sphere=false)
void explode (Vec3 pos, float power=1.0f, bool sphere=false)
virtual ~Explosion ()
void drawAndUpdate (float dTime)
bool isAlive ()

Protected Member Functions

Vec3 newVelocity (bool sphere=false)

Protected Attributes

float life
float totLife
float power
explosionParticle particles [NUM_EXPLOSION_PARTICLES]
explosionDebris debris [NUM_EXPLOSION_DEBRIS]


Detailed Description

Definition at line 36 of file Explosion.h.


Constructor & Destructor Documentation

Explosion::Explosion  ) 
 

Explosion.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 9 of file Explosion.cpp.

Explosion::Explosion Vec3  pos,
float  power = 1.0f,
bool  sphere = false
 

Definition at line 12 of file Explosion.cpp.

References explode().

Here is the call graph for this function:

Explosion::~Explosion  )  [virtual]
 

Definition at line 16 of file Explosion.cpp.


Member Function Documentation

void Explosion::drawAndUpdate float  dTime  ) 
 

Definition at line 55 of file Explosion.cpp.

References app, Renderer::apply(), explosionDebris::color, explosionParticle::color, debris, GL_TEXTURE0_ARB, glMultiTexCoord2fARB, LEQUAL, life, NUM_EXPLOSION_DEBRIS, NUM_EXPLOSION_PARTICLES, ONE, particles, explosionDebris::position, explosionParticle::position, power, Application::renderer, explosionDebris::rotation, explosionDebris::rotationSpeed, explosionDebris::scale, Renderer::setBlending(), Renderer::setDepthFunc(), SRC_ALPHA, totLife, explosionDebris::velocity, explosionParticle::velocity, Vec4::w, Vec4::x, Vec3::y, Vec4::y, Vec3::z, and Vec4::z.

Referenced by Play::drawExplosions().

Here is the call graph for this function:

void Explosion::explode Vec3  pos,
float  power = 1.0f,
bool  sphere = false
 

Definition at line 19 of file Explosion.cpp.

References explosionDebris::color, explosionParticle::color, debris, EXPLOSION_RAND, life, newVelocity(), NUM_EXPLOSION_DEBRIS, NUM_EXPLOSION_PARTICLES, particles, explosionDebris::position, explosionParticle::position, explosionDebris::rotation, explosionDebris::rotationSpeed, explosionDebris::scale, totLife, explosionDebris::velocity, and explosionParticle::velocity.

Referenced by Play::createExplosion(), and Explosion().

Here is the call graph for this function:

bool Explosion::isAlive  )  [inline]
 

Definition at line 44 of file Explosion.h.

References life.

Vec3 Explosion::newVelocity bool  sphere = false  )  [protected]
 

Definition at line 42 of file Explosion.cpp.

References EXPLOSION_RAND, Vec3::normalize(), Vec3::x, Vec3::y, and Vec3::z.

Referenced by explode().

Here is the call graph for this function:


Member Data Documentation

explosionDebris Explosion::debris[NUM_EXPLOSION_DEBRIS] [protected]
 

Definition at line 54 of file Explosion.h.

Referenced by drawAndUpdate(), and explode().

float Explosion::life [protected]
 

Definition at line 50 of file Explosion.h.

Referenced by drawAndUpdate(), explode(), and isAlive().

explosionParticle Explosion::particles[NUM_EXPLOSION_PARTICLES] [protected]
 

Definition at line 53 of file Explosion.h.

Referenced by drawAndUpdate(), and explode().

float Explosion::power [protected]
 

Definition at line 52 of file Explosion.h.

Referenced by drawAndUpdate().

float Explosion::totLife [protected]
 

Definition at line 51 of file Explosion.h.

Referenced by drawAndUpdate(), and explode().


Generated on Sun Jun 5 15:49:31 2005 for Defacto by  doxygen 1.4.3