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

ParticleSystems::Emitter Class Reference

The Emitter Class. More...

#include <Emitter.h>

Inheritance diagram for ParticleSystems::Emitter:

ParticleSystems::PlanarEmitter ParticleSystems::PointEmitter List of all members.

Public Types

enum  PARTICLETYPE { POINT, IMAGE, STRIKE }
 A public enum. More...

Public Member Functions

 Emitter (int SYSID, Solver *s, PARTICLETYPE type, GraphicsLib::Vector initVel, GraphicsLib::Colour initialColor, GLfloat pSize)
 The Constructor.
 Emitter (int SYSID, Solver *s, PARTICLETYPE type, GraphicsLib::Vector initVel, GraphicsLib::Colour initialColor, GLfloat pSize, char *TexName)
 The Constructor.
virtual ~Emitter ()
 The Destructor.
virtual ParticleemittParticles (void)=0
 An abstract Function.
virtual void reBirth (Particle *p)=0
 An abstract Function.

Public Attributes

PARTICLETYPE type
 A public variable.
Texture texture
 A public variable.
GLfloat particleLife
 A public variable.
GLfloat particleSize
 A public variable.
GLfloat particleSizeFlare
 A public variable.
GraphicsLib::Vector initialVelocity
 A public Variable.
GraphicsLib::Colour initialColor
 A public Variable.
GraphicsLib::Colour flareColor
 A public Variable.
Solversolver
 A public Variable.

Protected Attributes

int SYSID
 A protected Variable.
TGALoaderloader
 A protected Variable.

Private Member Functions

void initEmitter ()
 A private Function.

Detailed Description

The Emitter Class.

The Emitter Class is the Superclass for all Emitters. The functionality of a Emitter is to initialise new Particles or reBirth dead Particles.

Author:
Hannes Ricklefs

Definition at line 30 of file Emitter.h.


Member Enumeration Documentation

enum ParticleSystems::Emitter::PARTICLETYPE
 

A public enum.

Defines the possible types a Particle can be namely Point, Image, and Strike

Enumeration values:
POINT 
IMAGE 
STRIKE 

Definition at line 38 of file Emitter.h.


Constructor & Destructor Documentation

Emitter::Emitter int  SYSID,
Solver s,
PARTICLETYPE  type,
GraphicsLib::Vector  initVel,
GraphicsLib::Colour  initialColor,
GLfloat  pSize
 

The Constructor.

Constructs a new Emitter

Parameters:
SYSID the ParticleSystemID
type the ParticleType
initVel the initial velocity for a particle
initalColor the inital Colour of a particle
pSize the inital Size

Definition at line 10 of file Emitter.cpp.

References initEmitter(), initialColor, initialVelocity, particleSize, solver, and type.

Emitter::Emitter int  SYSID,
Solver s,
PARTICLETYPE  type,
GraphicsLib::Vector  initVel,
GraphicsLib::Colour  initialColor,
GLfloat  pSize,
char *  TexName
 

The Constructor.

Constructs a new Emitter with a Texture

Parameters:
SYSID the ParticleSystemID
type the ParticleType
initVel the initial velocity for a particle
initalColor the inital Colour of a particle
pSize the inital Size
TexName a pointer to a texture

Definition at line 25 of file Emitter.cpp.

References initEmitter(), initialColor, initialVelocity, loader, ParticleSystems::TGALoader::LoadTGA(), particleSize, solver, texture, and type.

Emitter::~Emitter  )  [virtual]
 

The Destructor.

Destructs this Emitter

Definition at line 44 of file Emitter.cpp.


Member Function Documentation

virtual Particle* ParticleSystems::Emitter::emittParticles void   )  [pure virtual]
 

An abstract Function.

Emitts a new Particle according to the values

Returns:
A pointer to the new Particle

Implemented in ParticleSystems::PlanarEmitter, and ParticleSystems::PointEmitter.

Referenced by ParticleSystems::ParticleSystem::newParticle().

void Emitter::initEmitter  )  [private]
 

A private Function.

Initialises the Emitter. Sets some default values. No flare for Size and Colour.

Definition at line 47 of file Emitter.cpp.

References flareColor, particleLife, and particleSizeFlare.

Referenced by Emitter().

virtual void ParticleSystems::Emitter::reBirth Particle p  )  [pure virtual]
 

An abstract Function.

Reinitialises the given Particle as it would be newly created

Parameters:
P a pointer to the Particle to be reborne

Implemented in ParticleSystems::PlanarEmitter, and ParticleSystems::PointEmitter.

Referenced by ParticleSystems::ParticleSystem::newParticle().


Member Data Documentation

GraphicsLib::Colour ParticleSystems::Emitter::flareColor
 

A public Variable.

The flare Colour of the particle to be emitted

Definition at line 140 of file Emitter.h.

Referenced by fire(), initEmitter(), multiCollision(), and smoke().

GraphicsLib::Colour ParticleSystems::Emitter::initialColor
 

A public Variable.

Inital colour of the particle to be emitted

Definition at line 134 of file Emitter.h.

Referenced by Emitter().

GraphicsLib::Vector ParticleSystems::Emitter::initialVelocity
 

A public Variable.

Inital velocity of the particle to be emitted

Definition at line 128 of file Emitter.h.

Referenced by Emitter().

TGALoader* ParticleSystems::Emitter::loader [protected]
 

A protected Variable.

The TGALoader for ImgParticles

Definition at line 166 of file Emitter.h.

Referenced by Emitter().

GLfloat ParticleSystems::Emitter::particleLife
 

A public variable.

The particleLife

Definition at line 110 of file Emitter.h.

Referenced by fire(), initEmitter(), multiCollision(), and smoke().

GLfloat ParticleSystems::Emitter::particleSize
 

A public variable.

The Particle size

Definition at line 116 of file Emitter.h.

Referenced by Emitter().

GLfloat ParticleSystems::Emitter::particleSizeFlare
 

A public variable.

The Particle flare size

Definition at line 122 of file Emitter.h.

Referenced by fire(), initEmitter(), and smoke().

Solver* ParticleSystems::Emitter::solver
 

A public Variable.

The Solver for this Emitter

Definition at line 146 of file Emitter.h.

Referenced by Emitter().

int ParticleSystems::Emitter::SYSID [protected]
 

A protected Variable.

The current ID of the ParticleSystem this Emitter belongs to

Definition at line 160 of file Emitter.h.

Texture ParticleSystems::Emitter::texture
 

A public variable.

Stores the texture for the ImgParticle

Definition at line 104 of file Emitter.h.

Referenced by ParticleSystems::ParticleSystem::draw(), and Emitter().

PARTICLETYPE ParticleSystems::Emitter::type
 

A public variable.

Stores the Particle type of this emitter

Definition at line 98 of file Emitter.h.

Referenced by ParticleSystems::ParticleSystem::draw(), and Emitter().


The documentation for this class was generated from the following files:
Generated on Thu Mar 24 11:05:02 2005 for ParticleSystem by  doxygen 1.4.1