Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/branches/particleEngine: some more definitions of the particleSystem/Emitter

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 setSpread(float angle, float random = 0.0);
30  void setEmissionRate(float emissionRate, float random = 0.0);
31  void setVelocity(float velocity, float random = 0.0);
32
33  /* some functions needed for internal use */
34  void tick(float dt);
35
36 private:
37  Vector direction;     //!< emition direction
38  float angle;          //!< max angle from the direction of the emitter
39  float emissionRate;   //!< amount of particles per seconds emitted by emiter
40  float velocity;       //!< the contant speed a particle gets if been emitted
41};
42
43#endif /* _PARTICLE_EMITTER_H */
Note: See TracBrowser for help on using the repository browser.