PARTICLE Class Reference

#include <particles.h>

Collaboration diagram for PARTICLE:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PARTICLE ()
 ~PARTICLE ()
void Load ()
void Update (float timefactor, float fps)
void Draw ()
void SetParams (float transmin, float transmax, float longmin, float longmax, float speedmin, float speedmax, VERTEX direction, float sizemin, float sizemax)
void AddParticle (VERTEX pos)
void ProbAddParticle (VERTEX pos, float probability)
float ParticleHeight ()
void ClipParticles (VERTEX *rect)
void Clear ()
void SetWind (VERTEX newwind)

Private Member Functions

bool inrange (float x1, float x2, float val)
bool inrect (VERTEX *rect, VERTEX p)
bool overlap (VERTEX *rect1, VERTEX *rect2)
float randf (float min, float max)
void DrawParticle (struct SINGLE_PARTICLE &p)
void init_draw ()

Private Attributes

int slotguess
GLuint drawlist
TEXTURE_HANDLE texture [PARTICLE_TEXTURES]
VERTEX wind
double curtime
float pheight
SINGLE_PARTICLE particle [MAX_PARTICLES]
SINGLE_PARTICLE params [2]
int curtex
bool loaded

Detailed Description

Definition at line 67 of file particles.h.


Constructor & Destructor Documentation

PARTICLE::PARTICLE  ) 
 

Definition at line 27 of file particles.cpp.

References curtex, curtime, SINGLE_PARTICLE::direction, drawlist, loaded, SINGLE_PARTICLE::longevity, params, SINGLE_PARTICLE::size, slotguess, SINGLE_PARTICLE::speed, SINGLE_PARTICLE::transparency, and VERTEX::y.

PARTICLE::~PARTICLE  ) 
 

Definition at line 59 of file particles.cpp.

References drawlist, loaded, PARTICLE_TEXTURES, texture, TEXTURE_HANDLE::Unload(), and verbose_output.


Member Function Documentation

void PARTICLE::AddParticle VERTEX  pos  ) 
 

Definition at line 194 of file particles.cpp.

References curtex, curtime, SINGLE_PARTICLE::direction, SINGLE_PARTICLE::longevity, MAX_PARTICLES, params, particle, randf(), SINGLE_PARTICLE::rotation, SINGLE_PARTICLE::size, slotguess, SINGLE_PARTICLE::speed, SINGLE_PARTICLE::start_position, SINGLE_PARTICLE::texture, SINGLE_PARTICLE::timestamp, SINGLE_PARTICLE::transparency, wind, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by ProbAddParticle().

void PARTICLE::Clear  ) 
 

Definition at line 442 of file particles.cpp.

References particle.

Referenced by LoadWorld().

void PARTICLE::ClipParticles VERTEX rect  ) 
 

Definition at line 333 of file particles.cpp.

void PARTICLE::Draw  ) 
 

Definition at line 259 of file particles.cpp.

References curtime, DrawParticle(), MAX_PARTICLES, and particle.

Referenced by VAMOSWORLD::DrawTopLevel().

void PARTICLE::DrawParticle struct SINGLE_PARTICLE p  )  [private]
 

Definition at line 281 of file particles.cpp.

References TEXTURE_HANDLE::Activate(), curtime, SINGLE_PARTICLE::direction, drawlist, SINGLE_PARTICLE::longevity, NUM_ROTATIONS, VERTEX::ScaleR(), SINGLE_PARTICLE::size, SINGLE_PARTICLE::speed, SINGLE_PARTICLE::start_position, SINGLE_PARTICLE::texture, texture, SINGLE_PARTICLE::timestamp, SINGLE_PARTICLE::transparency, VERTEX::x, VERTEX::y, and VERTEX::z.

Referenced by Draw().

void PARTICLE::init_draw  )  [private]
 

Definition at line 151 of file particles.cpp.

References pheight.

bool PARTICLE::inrange float  x1,
float  x2,
float  val
[private]
 

Definition at line 426 of file particles.cpp.

bool PARTICLE::inrect VERTEX rect,
VERTEX  p
[private]
 

Definition at line 392 of file particles.cpp.

References VERTEX::x, and VERTEX::z.

Referenced by overlap().

void PARTICLE::Load  ) 
 

Definition at line 80 of file particles.cpp.

References drawlist, loaded, PARTICLE_TEXTURES, texture, and TEXTURE_HANDLE::Unload().

Referenced by ChangeDisplay(), and InitGameData().

bool PARTICLE::overlap VERTEX rect1,
VERTEX rect2
[private]
 

Definition at line 436 of file particles.cpp.

References inrect().

float PARTICLE::ParticleHeight  ) 
 

Definition at line 328 of file particles.cpp.

References pheight.

void PARTICLE::ProbAddParticle VERTEX  pos,
float  probability
 

Definition at line 319 of file particles.cpp.

References AddParticle(), and randf().

float PARTICLE::randf float  min,
float  max
[private]
 

Definition at line 238 of file particles.cpp.

Referenced by AddParticle(), and ProbAddParticle().

void PARTICLE::SetParams float  transmin,
float  transmax,
float  longmin,
float  longmax,
float  speedmin,
float  speedmax,
VERTEX  direction,
float  sizemin,
float  sizemax
 

Definition at line 177 of file particles.cpp.

References SINGLE_PARTICLE::direction, SINGLE_PARTICLE::longevity, params, SINGLE_PARTICLE::size, SINGLE_PARTICLE::speed, and SINGLE_PARTICLE::transparency.

void PARTICLE::SetWind VERTEX  newwind  )  [inline]
 

Definition at line 85 of file particles.h.

References wind.

Referenced by InitGameData().

void PARTICLE::Update float  timefactor,
float  fps
 

Definition at line 254 of file particles.cpp.

References curtime.

Referenced by Update().


Member Data Documentation

int PARTICLE::curtex [private]
 

Definition at line 105 of file particles.h.

Referenced by AddParticle(), and PARTICLE().

double PARTICLE::curtime [private]
 

Definition at line 94 of file particles.h.

Referenced by AddParticle(), Draw(), DrawParticle(), PARTICLE(), and Update().

GLuint PARTICLE::drawlist [private]
 

Definition at line 89 of file particles.h.

Referenced by DrawParticle(), Load(), PARTICLE(), and ~PARTICLE().

bool PARTICLE::loaded [private]
 

Definition at line 111 of file particles.h.

Referenced by Load(), PARTICLE(), and ~PARTICLE().

struct SINGLE_PARTICLE PARTICLE::params[2] [private]
 

Definition at line 103 of file particles.h.

Referenced by AddParticle(), PARTICLE(), and SetParams().

struct SINGLE_PARTICLE PARTICLE::particle[MAX_PARTICLES] [private]
 

Definition at line 102 of file particles.h.

Referenced by AddParticle(), Clear(), and Draw().

float PARTICLE::pheight [private]
 

Definition at line 96 of file particles.h.

Referenced by init_draw(), and ParticleHeight().

int PARTICLE::slotguess [private]
 

Definition at line 88 of file particles.h.

Referenced by AddParticle(), and PARTICLE().

TEXTURE_HANDLE PARTICLE::texture[PARTICLE_TEXTURES] [private]
 

Definition at line 90 of file particles.h.

Referenced by DrawParticle(), Load(), and ~PARTICLE().

VERTEX PARTICLE::wind [private]
 

Definition at line 92 of file particles.h.

Referenced by AddParticle(), and SetWind().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:12:22 2006 by  doxygen 1.4.6