00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(__INCLUDE_ParticleEmitterh_INCLUDE__)
00022 #define __INCLUDE_ParticleEmitterh_INCLUDE__
00023
00024 #include <graph/ParticleEngine.h>
00025 #include <GLEXT/GLTextureSet.h>
00026 #include <common/OptionsTransient.h>
00027
00028 class ParticleEmitter
00029 {
00030 public:
00031 ParticleEmitter();
00032 virtual ~ParticleEmitter();
00033
00034 float life1_, life2_;
00035 float mass1_, mass2_;
00036 float friction1_, friction2_;
00037
00038 float startAlpha1_, startAlpha2_;
00039 float endAlpha1_, endAlpha2_;
00040 Vector velocity1_, velocity2_;
00041 Vector startColor1_, startColor2_;
00042 Vector endColor1_, endColor2_;
00043 Vector startSize1_, startSize2_;
00044 Vector endSize1_, endSize2_;
00045 Vector gravity_;
00046 bool additiveTexture_;
00047 bool windAffect_;
00048
00049 void createDefaultParticle(Particle &particle);
00050
00051 void setAttributes(
00052 float life1, float life2,
00053 float mass1, float mass2,
00054 float friction1, float friction2,
00055 Vector velocity1, Vector velocity2,
00056 Vector startColor1, float startAlpha1,
00057 Vector startColor2, float startAlpha2,
00058 Vector endColor1, float endAlpha1,
00059 Vector endColor2, float endAlpha2,
00060 float startX1, float startY1,
00061 float startX2, float startY2,
00062 float endX1, float endY1,
00063 float endX2, float endY2,
00064 Vector gravity,
00065 bool additiveTexture,
00066 bool windAffect);
00067
00068 void setLife(float life1, float life2);
00069 void setMass(float mass1, float mass2);
00070 void setFriction(float friction1, float friction2);
00071 void setVelocity(Vector velocity1, Vector velocity2);
00072 void setStartColor(
00073 Vector startColor1, float startAlpha1,
00074 Vector startColor2, float startAlpha2);
00075 void setEndColor(
00076 Vector endColor1, float endAlpha1,
00077 Vector endColor2, float endAlpha2);
00078 void setStartSize(
00079 float startX1, float startY1,
00080 float startX2, float startY2);
00081 void setEndSize(
00082 float endX1, float endY1,
00083 float endX2, float endY2);
00084 void setGravity(Vector gravity);
00085 void setAdditiveTexture(bool additiveTexture);
00086 void setWindAffect(bool windAffect);
00087
00088 void emitLinear(int number,
00089 Vector &position1, Vector &position2,
00090 ParticleEngine &engine,
00091 ParticleRenderer *renderer = 0);
00092 void emitExplosionRing(int number,
00093 Vector &position,
00094 ParticleEngine &engine,
00095 ParticleRenderer *renderer = 0);
00096 void emitDebris(int number,
00097 Vector &position,
00098 ParticleEngine &engine);
00099 void emitSmoke(int number,
00100 Vector &position,
00101 ParticleEngine &engine);
00102 void emitNapalm(
00103 Vector &position,
00104 ParticleEngine &engine,
00105 GLTextureSet *set);
00106 void emitSpray(
00107 Vector &position,
00108 ParticleEngine &engine,
00109 float width,
00110 GLTexture *texture);
00111 void emitTalk(
00112 Vector &position,
00113 ParticleEngine &engine);
00114 void emitWallHit(
00115 Vector &position,
00116 ParticleEngine &engine,
00117 OptionsTransient::WallSide type);
00118 void emitTransport(
00119 Vector &position,
00120 ParticleEngine &engine,
00121 GLTextureSet *set);
00122 void emitExplosion(
00123 Vector &position,
00124 ParticleEngine &engine,
00125 float width,
00126 GLTextureSet *set,
00127 bool animate);
00128 void emitMushroom(
00129 Vector &position,
00130 ParticleEngine &engine,
00131 int number,
00132 float width);
00133 void emitPrecipitation(
00134 Vector &position,
00135 ParticleEngine &engine,
00136 int number,
00137 bool rain);
00138 };
00139
00140 #endif // __INCLUDE_ParticleEmitterh_INCLUDE__
00141