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

Particle.h

Go to the documentation of this file.
00001 
00006 #ifndef __PARTICLE_H__
00007 #define __PARTICLE_H__
00008 
00009 #ifdef __APPLE__
00010 #include <GraphicsLib/Vector.h>
00011 #include <GraphicsLib/Colour.h>
00012 #include <GraphicsLib/Point3.h>
00013 #include <GraphicsLib/Util.h>
00014 #else
00015 #include "Vector.h"
00016 #include "Colour.h"
00017 #include "Point3.h"
00018 #include "Util.h"
00019 #endif
00020 
00021 #include "Solver.h"
00022 
00023 
00024 namespace ParticleSystems {
00025         
00027 
00033         class Particle {
00034         
00035         public:
00036                 
00038 
00044                 Particle(int sysId, Solver *sol);
00045                 
00047 
00060                 Particle(   int sysId,
00061                                         Solver *sol,
00062                                         GraphicsLib::Point3 pos,
00063                     GraphicsLib::Vector vel,
00064                     GraphicsLib::Colour c,
00065                                         GraphicsLib::Colour fc,
00066                                         GLfloat size,
00067                                         GLfloat fsize,
00068                                         GLfloat maxLife
00069                                 );
00070                 
00072 
00086         Particle(   int sysId,
00087                                         GraphicsLib::Point3 pos,
00088                     GraphicsLib::Vector vel,
00089                     GraphicsLib::Colour c,
00090                     GLfloat trans,
00091                     float b,
00092                     float ma,
00093                     float mo,
00094                     float e,
00095                     float s
00096                 );
00097 
00099 
00102                 virtual ~Particle();
00103                 
00105 
00108                 virtual void draw() = 0;
00109                 
00111 
00114                 virtual void update() = 0;
00115                 
00117 
00121                 virtual bool isDead() = 0;
00122                 
00124 
00127                 GLfloat life;
00128                 
00130 
00133                 GLfloat MAXLIFE;
00134                 
00136 
00139                 int SYSID;
00140                 
00142 
00145         Solver *solv;
00146                 
00148 
00151                 GraphicsLib::Point3 position;
00152                 
00154 
00157                 GraphicsLib::Point3 old_Position;
00158                 
00160 
00163                 GraphicsLib::Vector velocity;
00164                 
00166 
00169                 GraphicsLib::Vector accel;
00170                 
00172 
00175                 GraphicsLib::Colour colour;
00176                 
00178 
00182                 GraphicsLib::Colour faded_colour;
00183                 
00185 
00188                 GLfloat transparency;
00189                 
00191 
00194                 float bounce;
00195                 
00197 
00200                 float mass;
00201                 
00203 
00206                 float momentum;
00207                 
00209 
00212                 float energy;
00213                 
00215 
00218                 GLfloat size;
00219                 
00221 
00225                 GLfloat flare_size;
00226                 
00228 
00232                 bool dead;
00233                 
00234         };
00235 }
00236 #endif
00237 
00238                 

Generated on Thu Mar 24 11:05:02 2005 for ParticleSystem by  doxygen 1.4.1