Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/particleEngine/src/lib/graphics/particles/particle_engine.h @ 4128

Last change on this file since 4128 was 4128, checked in by bensch, 19 years ago

orxonox/branches/particleEngine: renders some particles again

File size: 1.3 KB
Line 
1/*!
2    \file particle_engine.h
3    \brief Definition of the ParticleEngine
4*/
5
6#ifndef _PARTICLE_ENGINE_H
7#define _PARTICLE_ENGINE_H
8
9#include "base_object.h"
10#include "particle_system.h"
11#include "particle_emitter.h"
12
13// FORWARD DEFINITION
14template<class T> class tList;
15class ParticleSystem;
16class ParticleEmitter;
17
18struct ParticleConnection
19{
20  ParticleEmitter* emitter;    //!< The emitter to emit system from.
21  ParticleSystem* system;      //!< The Particles emitted from emitter.
22};
23
24//! A default singleton class.
25class ParticleEngine : public BaseObject {
26
27 public:
28  static ParticleEngine* getInstance(void);
29  virtual ~ParticleEngine(void);
30
31  void tick(float dt);
32  void draw(void);
33
34  void addSystem(ParticleSystem* system);
35  void addEmitter(ParticleEmitter* emitter);
36  void addConnection(ParticleEmitter* emitter, ParticleSystem* system);
37
38  bool removeSystem(ParticleSystem* system);
39  bool removeEmitter(ParticleEmitter* emitter);
40  bool breakConnection(ParticleEmitter* emitter, ParticleSystem* system);
41  bool breakConnection(ParticleConnection* connection);
42
43  void debug();
44
45 private:
46  ParticleEngine(void);
47  static ParticleEngine* singletonRef;
48
49  tList<ParticleSystem>* systemList;
50  tList<ParticleEmitter>* emitterList;
51
52  tList<ParticleConnection>* connectionList;
53};
54
55#endif /* _PARTICLE_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.