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

ParticleSystem Class Reference

#include <ParticleSystem.h>

Inherited by OpenGLParticleSystem.

Inheritance diagram for ParticleSystem:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ParticleSystem ()
 ~ParticleSystem ()
bool update (float dTime, bool absoluteTime=false)
void move (Vec3 location)
Vec3 getPos ()
void getLocation (Vec3 &location)
unsigned int numParticles ()
void setRenderer (void *renderer)
void loadPreset (unsigned int preset)
bool isMoving ()
bool isColliding ()
bool isAttractive ()
void start ()
void die ()
bool isAlive ()
virtual void draw ()=0
virtual bool drawAndUpdate (Camera *camera, float dTime, bool absoluteTime=false, bool billboard=true)=0

Public Attributes

void * m_renderer
int m_textureID
unsigned int m_particlesPerSec
unsigned int m_particlesAlive
Vec3 m_prevLocation
Vec3 m_location
Vec3 m_velocity
Vec3 m_direction
Vec3 m_baseLocation
float m_gravityStart
float m_gravityVar
float m_gravityEnd
float m_sizeStart
float m_sizeVar
float m_sizeEnd
float m_alphaStart
float m_alphaVar
float m_alphaEnd
float m_speed
float m_speedVar
float m_life
float m_lifeVar
Vec4 m_colorStart
Vec4 m_colorVar
Vec4 m_colorEnd
float m_theta
float m_age
float m_timeLastUpdate
float m_emissionResidue
bool m_isMoving
bool m_isAttractive
bool m_isSuppressed
bool m_isColliding
bool m_alive
Particle m_particles [MAX_PARTICLES]

Detailed Description

Definition at line 46 of file ParticleSystem.h.


Constructor & Destructor Documentation

ParticleSystem::ParticleSystem  ) 
 

ParticleSystem.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 9 of file ParticleSystem.cpp.

References die(), m_age, m_direction, m_emissionResidue, and m_timeLastUpdate.

Here is the call graph for this function:

ParticleSystem::~ParticleSystem  ) 
 

Definition at line 17 of file ParticleSystem.cpp.


Member Function Documentation

void ParticleSystem::die  )  [inline]
 

Definition at line 63 of file ParticleSystem.h.

References m_alive.

Referenced by Play::networkLoop(), and ParticleSystem().

virtual void ParticleSystem::draw  )  [pure virtual]
 

Implemented in OpenGLParticleSystem.

virtual bool ParticleSystem::drawAndUpdate Camera camera,
float  dTime,
bool  absoluteTime = false,
bool  billboard = true
[pure virtual]
 

Implemented in OpenGLParticleSystem.

void ParticleSystem::getLocation Vec3 location  ) 
 

Definition at line 156 of file ParticleSystem.cpp.

References m_location.

Referenced by Particle::update().

Vec3 ParticleSystem::getPos  )  [inline]
 

Definition at line 52 of file ParticleSystem.h.

References m_location.

Referenced by Play::drawParticleSystems().

bool ParticleSystem::isAlive  )  [inline]
 

Definition at line 64 of file ParticleSystem.h.

References m_alive.

bool ParticleSystem::isAttractive  ) 
 

Definition at line 152 of file ParticleSystem.cpp.

References m_isAttractive.

Referenced by Particle::update().

bool ParticleSystem::isColliding  ) 
 

Definition at line 148 of file ParticleSystem.cpp.

References m_isColliding.

bool ParticleSystem::isMoving  ) 
 

Definition at line 144 of file ParticleSystem.cpp.

References m_isMoving.

void ParticleSystem::loadPreset unsigned int  preset  ) 
 

Definition at line 168 of file ParticleSystem.cpp.

References FALSE, m_alphaEnd, m_alphaStart, m_alphaVar, m_colorEnd, m_colorStart, m_colorVar, m_gravityEnd, m_gravityStart, m_gravityVar, m_isAttractive, m_isColliding, m_isMoving, m_life, m_lifeVar, m_particlesPerSec, m_sizeEnd, m_sizeStart, m_sizeVar, m_speed, m_speedVar, m_theta, PARTICLESYSTEM_SPAWN, PARTICLESYSTEM_SUN, TRUE, Vec4::x, Vec4::y, and Vec4::z.

Referenced by Menu::load(), and Play::startParticleSystem().

void ParticleSystem::move Vec3  location  ) 
 

Definition at line 138 of file ParticleSystem.cpp.

References m_baseLocation, m_location, and m_prevLocation.

Referenced by Play::setParticleSystemPos(), and Play::startParticleSystem().

unsigned int ParticleSystem::numParticles  ) 
 

Definition at line 160 of file ParticleSystem.cpp.

References m_particlesAlive.

void ParticleSystem::setRenderer void *  renderer  ) 
 

Definition at line 164 of file ParticleSystem.cpp.

References m_renderer.

void ParticleSystem::start  )  [inline]
 

Definition at line 62 of file ParticleSystem.h.

References m_alive.

Referenced by Menu::load(), and Play::startParticleSystem().

bool ParticleSystem::update float  dTime,
bool  absoluteTime = false
 

Definition at line 20 of file ParticleSystem.cpp.

References Clamp, int(), Particle::m_age, m_age, Particle::m_alpha, m_alphaEnd, m_alphaStart, m_alphaVar, Particle::m_color, m_colorEnd, m_colorStart, m_colorVar, Particle::m_dAlpha, Particle::m_dColor, Particle::m_dGravity, Particle::m_dSize, m_emissionResidue, Particle::m_gravity, m_gravityEnd, m_gravityStart, m_gravityVar, m_isMoving, m_isSuppressed, m_life, Particle::m_lifetime, m_lifeVar, Particle::m_location, m_location, m_particles, m_particlesAlive, m_particlesPerSec, Particle::m_prevLocation, m_prevLocation, Particle::m_size, m_sizeEnd, m_sizeStart, m_sizeVar, m_speed, m_speedVar, m_theta, m_timeLastUpdate, Particle::m_velocity, MAX_ALPHA, MAX_GRAVITY, MAX_LIFETIME, MAX_PARTICLES, MAX_SIZE, MAX_SPEED, MIN_ALPHA, MIN_GRAVITY, MIN_LIFETIME, MIN_SIZE, MIN_SPEED, RANDOM_NUM, Particle::setParent(), Vec4::w, Vec4::x, Vec3::x, Vec4::y, Vec3::y, Vec4::z, and Vec3::z.

Referenced by OpenGLParticleSystem::drawAndUpdate().

Here is the call graph for this function:


Member Data Documentation

float ParticleSystem::m_age
 

Definition at line 106 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::draw(), OpenGLParticleSystem::drawAndUpdate(), ParticleSystem(), and update().

bool ParticleSystem::m_alive
 

Definition at line 116 of file ParticleSystem.h.

Referenced by die(), OpenGLParticleSystem::drawAndUpdate(), isAlive(), and start().

float ParticleSystem::m_alphaEnd
 

Definition at line 92 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_alphaStart
 

Definition at line 90 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_alphaVar
 

Definition at line 91 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

Vec3 ParticleSystem::m_baseLocation
 

Definition at line 80 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), and move().

Vec4 ParticleSystem::m_colorEnd
 

Definition at line 102 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

Vec4 ParticleSystem::m_colorStart
 

Definition at line 100 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

Vec4 ParticleSystem::m_colorVar
 

Definition at line 101 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

Vec3 ParticleSystem::m_direction
 

Definition at line 79 of file ParticleSystem.h.

Referenced by ParticleSystem().

float ParticleSystem::m_emissionResidue
 

Definition at line 109 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), ParticleSystem(), and update().

float ParticleSystem::m_gravityEnd
 

Definition at line 84 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_gravityStart
 

Definition at line 82 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_gravityVar
 

Definition at line 83 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

bool ParticleSystem::m_isAttractive
 

Definition at line 112 of file ParticleSystem.h.

Referenced by isAttractive(), and loadPreset().

bool ParticleSystem::m_isColliding
 

Definition at line 114 of file ParticleSystem.h.

Referenced by isColliding(), and loadPreset().

bool ParticleSystem::m_isMoving
 

Definition at line 111 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), isMoving(), loadPreset(), and update().

bool ParticleSystem::m_isSuppressed
 

Definition at line 113 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), and update().

float ParticleSystem::m_life
 

Definition at line 97 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_lifeVar
 

Definition at line 98 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

Vec3 ParticleSystem::m_location
 

Definition at line 77 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::draw(), OpenGLParticleSystem::drawAndUpdate(), getLocation(), getPos(), move(), and update().

Particle ParticleSystem::m_particles[MAX_PARTICLES]
 

Definition at line 118 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::draw(), OpenGLParticleSystem::drawAndUpdate(), and update().

unsigned int ParticleSystem::m_particlesAlive
 

Definition at line 74 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), numParticles(), and update().

unsigned int ParticleSystem::m_particlesPerSec
 

Definition at line 73 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

Vec3 ParticleSystem::m_prevLocation
 

Definition at line 76 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), move(), and update().

void* ParticleSystem::m_renderer
 

Definition at line 70 of file ParticleSystem.h.

Referenced by setRenderer().

float ParticleSystem::m_sizeEnd
 

Definition at line 88 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_sizeStart
 

Definition at line 86 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_sizeVar
 

Definition at line 87 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_speed
 

Definition at line 94 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_speedVar
 

Definition at line 95 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

int ParticleSystem::m_textureID
 

Definition at line 72 of file ParticleSystem.h.

float ParticleSystem::m_theta
 

Definition at line 104 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), loadPreset(), and update().

float ParticleSystem::m_timeLastUpdate
 

Definition at line 108 of file ParticleSystem.h.

Referenced by OpenGLParticleSystem::drawAndUpdate(), ParticleSystem(), and update().

Vec3 ParticleSystem::m_velocity
 

Definition at line 78 of file ParticleSystem.h.


Generated on Sun Jun 5 15:50:36 2005 for Defacto by  doxygen 1.4.3