Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/particles/particle_engine.h @ 4338

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

orxonox/trunk: merged branches/physics back to the trunk
merged with command
svn merge -r 3866:HEAD . ../../trunk/
many conflict that i tried to resolv
@patrick: i hope i did not interfere with your stuff :/

File size: 1.5 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;
15
16struct ParticleConnection
17{
18  ParticleEmitter* emitter;    //!< The emitter to emit system from.
19  ParticleSystem* system;      //!< The Particles emitted from emitter.
20};
21
22//! A default singleton class.
23class ParticleEngine : public BaseObject {
24
25 public:
26  static ParticleEngine* getInstance(void);
27  virtual ~ParticleEngine(void);
28
29  void tick(float dt);
30  void draw(float dt);
31
32  void addSystem(ParticleSystem* system);
33  void addEmitter(ParticleEmitter* emitter);
34  void addConnection(ParticleEmitter* emitter, ParticleSystem* system);
35
36  bool removeSystem(ParticleSystem* system);
37  bool removeEmitter(ParticleEmitter* emitter);
38  bool breakConnection(ParticleEmitter* emitter, ParticleSystem* system);
39  bool breakConnection(ParticleConnection* connection);
40
41  ParticleSystem* getSystemByName(const char* systemName) const;
42  ParticleSystem* getSystemByNumber(unsigned int number) const;
43  ParticleEmitter* getEmitterByName(const char* emitterName) const;
44  ParticleEmitter* getEmitterByNumber(unsigned int number) const;
45
46  void debug();
47
48 private:
49  ParticleEngine(void);
50  static ParticleEngine* singletonRef;
51
52  tList<ParticleSystem>* systemList;
53  tList<ParticleEmitter>* emitterList;
54
55  tList<ParticleConnection>* connectionList;
56};
57
58#endif /* _PARTICLE_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.