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

Particle Class Reference

#include <gameobjs.h>

Inheritance diagram for Particle:

Inheritance graph
[legend]
Collaboration diagram for Particle:

Collaboration graph
[legend]
List of all members.

Detailed Description

Particle object - exhaust.

Getting more specialised now, as now we have lifetimes


Public Member Functions

 Particle ()
 Simple constructor.
void regen (Vec4 pos, Vec4 dir, float spread, Vec4 spd)
 Revive the particle (essentially create a new one, but it's the same object).
void render (void)
 GL_POINT, with no lighting.
void update (float time)
 As well as other physics updates, age it.


Constructor & Destructor Documentation

Particle::Particle  ) 
 

Simple constructor.

Ensure life is set to 0 and gravity is applied.


Member Function Documentation

void Particle::regen Vec4  pos,
Vec4  dir,
float  spread,
Vec4  spd
 

Revive the particle (essentially create a new one, but it's the same object).

A new particle is created in the middle of the ship, broadly directed out the back, but a random component is added around the y and z axes. The velocity and life are also slightly random. Looks nice.

Parameters:
pos Position of the new exhaust.
dir The centre of the plume.
spread How much to spread by. In radians.
spd Initial speed of the particle - this should come from the ship that spawned it.

Here is the call graph for this function:

void Particle::update float  time  )  [virtual]
 

As well as other physics updates, age it.

Parameters:
time In seconds.

Implements AbsObj.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Jan 3 15:14:19 2005 for Graviton by  doxygen 1.3.9.1