Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc @ 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: 2.5 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: ...
13   co-programmer: Patrick Boenzli
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
17
18#include "particle_emitter.h"
19
20using namespace std;
21
22
23/**
24   \brief standard constructor
25*/
26ParticleEmitter::ParticleEmitter(const Vector& direction, float angle, float emissionRate, 
27                  float velocity, float ttl)
28{
29   this->setClassName ("ParticleEmitter");
30   this->direction = direction;
31   this->angle = angle;
32   this->emissionRate = emissionRate;
33   this->velocity = velocity;
34   this->timeToLive = ttl;
35}
36
37
38
39/**
40   \brief standard destructor
41
42*/
43ParticleEmitter::~ParticleEmitter () 
44{}
45
46
47/**
48   \brief this start the emitter
49*/
50void ParticleEmitter::start() {}
51
52
53/**
54   \brief this stops the emitter
55*/
56void ParticleEmitter::stop() {}
57
58
59
60
61/* these are Animation interfaces: so you can change spec values as you want */
62
63/**
64   \brief set the angle of the emitter
65   \param angle around the direction in which there are particles to be emitted
66
67   if you want to change the value of this variable during emission time (to make it more dynamic)
68   you will have to use the animation class
69*/
70void ParticleEmitter::setAngle(float angle)
71{}
72
73
74/**
75   \brief set the emission rate
76   \param sets the number of particles emitted per second
77
78   if you want to change the value of this variable during emission time (to make it more dynamic)
79   you will have to use the animation class
80*/
81void ParticleEmitter::setEmissionRate(float emissionRate)
82{}
83
84
85/**
86   \brief sets the velocity of all particles emitted
87   \param velocity of the emitted particles
88
89   if you want to change the value of this variable during emission time (to make it more dynamic)
90   you will have to use the animation class
91*/
92void ParticleEmitter::setVelocity(float velocity)
93{}
94
95/**
96   \brief this set the time to life of a particle, after which it will die
97   \param the time to live in seconds
98
99   if you want to change the value of this variable during emission time (to make it more dynamic)
100   you will have to use the animation class
101*/
102void ParticleEmitter::setTTL(float ttl)
103{}
104
105
106/**
107   \brief this is called from the particle emitter to give the pulse of time...
108   \param time passed since last tick
109*/
110void ParticleEmitter::tick(float dt)
111{}
Note: See TracBrowser for help on using the repository browser.