TSmokeVol Class Reference

#include <SmokeVol.h>

Inheritance diagram for TSmokeVol:

TEffect List of all members.

Detailed Description

Class defining particles source Particles source is maintaining particles and controling their existence.


Public Member Functions

 TSmokeVol (float size, int maxCount, float duration, float PPS, float partSizeStart, float partSizeEnd, bool wind, bool gravity)
 Constructor for TSmokeVol generator.
virtual ~TSmokeVol ()
 Destructor for TSource.
virtual void TimeTick (const double &time, const double &delta)
 Recomputes the positions of all particles in particles list.
virtual void Render (TCamera *Camera)
 Renders smoke (insert particles in TTransparent list).
virtual bool IsExistent ()
 Determines, whether the effect lives, or passed away.
virtual void Move (const double &delta)
 Moves the source to new position.
virtual void GenerateParticles ()
 Function that generates smoke particles.
virtual void FireAt (const TVector &position, const TVector &dposition, float power, const TVector &direction, float partTTL, float disp, float mass)
 Fires the explosion at given position.
virtual void SetColor (const TColor &colorStart, const TColor &colorEnd, int method)
 Sets color of smoke Color may be varying in time, start and end color must be specified.

Static Public Attributes

static TInterpolation Interpolation
 defines interpolation of smoke effects
static TRendering Rendering
 defines renedring style of smoke effects

Protected Attributes

bool existent
 is true if smoke source exists
TVector position
 smoke source positoin
TVector dposition
 represents position change in time step
TVector direction
 smoke generation direction
float size
 smoke size
float dispersion
 ...
float speed
 ...
int maxCount
 maximum number of particles
int actCount
 current number of articles
float PPS
 particles per second
float actPPS
 actual particle generation speed
float partSizeStart
 start size of particle
float partSizeEnd
 final size of particle
float partTTL
 time to live of single particle
float duration
 smoke generation duration
float durationOld
 duration in last step
TParticleparticles
 list of particles
float last_delta
 ...
TColor colorStart
 starting smoke color
TColor colorEnd
 ending smoke color
int method
 ...
bool wind
 ...
bool gravity
 ...
int lastTex
 ...
float mass
 ...

Classes

class  TInterpolation
 Smoke Interpolation interface Represents smoke interpolation, that is used for smoke noise textures. More...
class  TParticle
 Source particle class Contains information of each single smoke particle. More...
class  TRendering
 Smoke rendering type Represents smoke rendering type, that can be used to alter smoke rendering style. More...


Constructor & Destructor Documentation

TSmokeVol::TSmokeVol float  size,
int  maxCount,
float  duration,
float  PPS,
float  partSizeStart,
float  partSizeEnd,
bool  wind,
bool  gravity
 

Constructor for TSmokeVol generator.

Parameters:
size ...
maxCount maximum number of particles
duration time of smoke generation
PPS ...
partSizeStart starting size of generated particle of smoke
partSizeEnd ending size of generated particle
wind ...
gravity ...


Member Function Documentation

void TSmokeVol::FireAt const TVector position,
const TVector dposition,
float  power,
const TVector direction,
float  partTTL,
float  disp,
float  mass
[virtual]
 

Fires the explosion at given position.

This function is used for firing explosion at given position. The particles are generated and initialized according to the current explosion's config - that can be set by the user, or is predefined with default values.

Parameters:
position an absolute position of explosion
dposition ...
power ...
direction ...
partTTL ...
disp ...
mass ...

virtual bool TSmokeVol::IsExistent  )  [inline, virtual]
 

Determines, whether the effect lives, or passed away.

Main game object uses this to see the moment when the effect completed it's task and should be removed from the game.

Return values:
true effect is alive and should remain in the game (default behaviour - effects are eternal)
false effect died and should be removed

Reimplemented from TEffect.

void TSmokeVol::Move const double &  delta  )  [virtual]
 

Moves the source to new position.

Parameters:
delta time that has passed since last move

void TSmokeVol::Render TCamera Camera  )  [virtual]
 

Renders smoke (insert particles in TTransparent list).

Adds all particles from particles list to TTransparent sorted list by calling TTransparent::ScheduleForRender.

Parameters:
Camera defines camera for which is smoke particle rendered

Implements TEffect.

void TSmokeVol::SetColor const TColor colorStart,
const TColor colorEnd,
int  method
[virtual]
 

Sets color of smoke Color may be varying in time, start and end color must be specified.

Parameters:
colorStart start color of smoke
colorEnd end color of smoke
method ...

void TSmokeVol::TimeTick const double &  time,
const double &  delta
[virtual]
 

Recomputes the positions of all particles in particles list.

Parameters:
time current time of simulation
delta time since last time tick

Reimplemented from TEffect.


The documentation for this class was generated from the following files:
Viewable With Any Browser   Valid HTML 4.01!   Generated on Fri Apr 14 08:04:31 2006 for TankGame by doxygen 1.4.6-NO