/*! \file particle_engine.h \brief Definition of the ParticleEngine */ #ifndef _PARTICLE_ENGINE_H #define _PARTICLE_ENGINE_H #include "base_object.h" #include "particle_system.h" #include "particle_emitter.h" // FORWARD DEFINITION template class tList; class ParticleSystem; class ParticleEmitter; struct ParticleConnection { ParticleEmitter* emitter; //!< The emitter to emit system from. ParticleSystem* system; //!< The Particles emitted from emitter. }; //! A default singleton class. class ParticleEngine : public BaseObject { public: static ParticleEngine* getInstance(void); virtual ~ParticleEngine(void); void tick(float dt); void draw(float dt); void addSystem(ParticleSystem* system); void addEmitter(ParticleEmitter* emitter); void addConnection(ParticleEmitter* emitter, ParticleSystem* system); bool removeSystem(ParticleSystem* system); bool removeEmitter(ParticleEmitter* emitter); bool breakConnection(ParticleEmitter* emitter, ParticleSystem* system); bool breakConnection(ParticleConnection* connection); void debug(); private: ParticleEngine(void); static ParticleEngine* singletonRef; tList* systemList; tList* emitterList; tList* connectionList; }; #endif /* _PARTICLE_ENGINE_H */