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

Emitter.h

Go to the documentation of this file.
00001 
00006 #ifndef __EMITTER_H__
00007 #define __EMITTER_H__
00008 
00009 #ifdef __APPLE__
00010         #include <GraphicsLib/Point3.h>
00011         #include <GraphicsLib/Vector.h>
00012 #else
00013         #include "Point3.h"
00014         #include "Vector.h"
00015 #endif
00016 
00017 #include "Particle.h"
00018 #include "Solver.h"
00019 #include "Force.h"
00020 #include "Texture.h"
00021 #include "TGALoader.h"
00022 
00023 namespace ParticleSystems {
00025 
00030         class Emitter {
00031                 
00032         public:
00033                 
00035 
00038                 enum PARTICLETYPE {POINT, IMAGE, STRIKE};
00039                 
00041 
00049                 Emitter(int SYSID, 
00050                                 Solver *s, 
00051                                 PARTICLETYPE type, 
00052                                 GraphicsLib::Vector initVel, 
00053                                 GraphicsLib::Colour initialColor, 
00054                                 GLfloat pSize); 
00055                                 
00057 
00066                 Emitter(int SYSID, 
00067                                 Solver *s, 
00068                                 PARTICLETYPE type, 
00069                                 GraphicsLib::Vector initVel, 
00070                                 GraphicsLib::Colour initialColor, 
00071                                 GLfloat pSize, 
00072                                 char *TexName); 
00073                 
00075 
00078                 virtual ~Emitter();
00079                 
00081 
00085                 virtual Particle* emittParticles(void) = 0;
00086                 
00088 
00092                 virtual void reBirth(Particle *p) = 0;
00093                 
00095 
00098                 PARTICLETYPE type;
00099         
00101 
00104                 Texture texture;
00105                 
00107 
00110                 GLfloat particleLife;
00111                 
00113 
00116                 GLfloat particleSize;
00117                 
00119 
00122                 GLfloat particleSizeFlare;
00123                 
00125 
00128                 GraphicsLib::Vector initialVelocity;
00129                 
00131 
00134                 GraphicsLib::Colour initialColor;
00135                 
00137 
00140                 GraphicsLib::Colour flareColor;
00141                 
00143 
00146                 Solver *solver;
00147                 
00148         private:
00150 
00153                 void initEmitter();
00154                 
00155         protected:
00157 
00160                 int SYSID;
00161                 
00163 
00166                 TGALoader *loader;
00167         };
00168 }
00169 #endif
00170 

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