Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.h @ 3929

Last change on this file since 3929 was 3929, checked in by patrick, 19 years ago

orxonox/branches/particle_system: implemented the abstract interface to ParticleEmitter

File size: 1.2 KB
Line 
1/*!
2    \file particle_e,otter.h
3    \brief Definition of a ParticleEmitter
4*/
5
6#ifndef _PARTICLE_EMITTER_H
7#define _PARTICLE_EMITTER_H
8
9#include "p_node.h"
10
11// FORWARD DEFINITION
12struct Particle;
13class ParticleSystem;
14
15
16//! A default singleton class.
17class ParticleEmitter : public PNode {
18
19 public:
20  ParticleEmitter(const Vector& direction, float angle = 20.0, float emissionRate = 1.0, 
21                  float velocity = 1.0, float ttl = 1.0);
22  virtual ~ParticleEmitter(void);
23
24  /* controlling the emitter: interface */
25  void start();
26  void stop();
27
28  /* controlling the behavour: these can be used as Animation interfaces */
29  void setAngle(float angle);
30  void setEmissionRate(float emissionRate);
31  void setVelocity(float velocity);
32  void setTTL(float ttl);
33
34  /* some functions needed for internal use */
35  void tick(float dt);
36
37 private:
38  Vector direction;     //!< emition direction
39  float angle;          //!< max angle from the direction of the emitter
40  float emissionRate;   //!< amount of particles per seconds emitted by emiter
41  float velocity;       //!< the contant speed a particle gets if been emitted
42  float timeToLive;     //!< this is the global time to live (ttl) definition
43};
44
45#endif /* _PARTICLE_EMITTER_H */
Note: See TracBrowser for help on using the repository browser.