00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef LSG_PARTICLESOURCE_H
00024 #define LSG_PARTICLESOURCE_H 1
00025
00026
00027
00028
00029
00030
00031 #include <lescegra/particle/particlemodifier.h>
00032
00033 #include <lescegra/particle/particle.h>
00034
00035 #include <lescegra/sg/node.h>
00036
00037 #include <lescegra/util/vertex.h>
00038
00039 typedef LsgParticle* (*LsgParticleGenerator)(float time);
00040
00041
00042
00043
00044
00045
00046
00047 typedef struct {
00048 LsgParticleModifier super;
00049 LsgParticleGenerator generator;
00050 Vertex location;
00051 Vertex location_error;
00052 Vertex speed;
00053 Vertex speed_error;
00054 float birth_rate;
00055 float birth_rate_error;
00056 float lifetime;
00057 float lifetime_error;
00058 float time;
00059 } LsgParticleSource;
00060
00061 LsgParticleSource* LsgParticleSource_create(LsgParticleGenerator generator, float now);
00062 void LsgParticleSource_init(LsgParticleSource* self, LsgParticleGenerator generator, float now);
00063 void LsgParticleSource_update(LsgParticleSource* self, LsgList* particles, float now);
00064
00065 #define LsgParticleSource_destroy(self) LsgParticleModifier_destroy(&(self)->super)
00066
00067 #endif