Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc @ 3931

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

orxonox/branches/particleEngine: some more properties

File size: 2.6 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)
28{
29   this->setClassName ("ParticleEmitter");
30   this->direction = direction;
31   this->setSpread(angle);
32   this->emissionRate = emissionRate;
33   this->velocity = velocity;
34}
35
36
37
38/**
39   \brief standard destructor
40
41*/
42ParticleEmitter::~ParticleEmitter () 
43{}
44
45
46/**
47   \brief this start the emitter
48*/
49void ParticleEmitter::start() {}
50
51
52/**
53   \brief this stops the emitter
54*/
55void ParticleEmitter::stop() {}
56
57
58
59
60/* these are Animation interfaces: so you can change spec values as you want */
61
62/**
63   \brief set the emission rate
64   \param sets the number of particles emitted per second
65   \param random A random emissionRate, the +- randomness of this option
66
67   if you want to change the value of this variable during emission time (to make it more dynamic)
68   you may want to use the animation class
69*/
70void ParticleEmitter::setEmissionRate(float emissionRate)
71{}
72
73/**
74   \brief set the angle of the emitter
75   \param angle around the direction in which there are particles to be emitted
76   \param randomAngle A random spread-angle, the +- randomness of this option
77
78   if you want to change the value of this variable during emission time (to make it more dynamic)
79   you may want to use the animation class
80*/
81void ParticleEmitter::setSpread(float angle, float randomAngle)
82{}
83
84
85
86
87/**
88   \brief sets the velocity of all particles emitted
89   \param velocity The starting velocity of the emitted particles
90   \param random A random starting velocity, the +- randomness of this option
91
92   if you want to change the value of this variable during emission time (to make it more dynamic)
93   you may want to use the animation class
94*/
95void ParticleEmitter::setVelocity(float velocity, float random)
96{}
97
98/**
99   \brief this set the time to life of a particle, after which it will die
100   \param the time to live in seconds
101
102   if you want to change the value of this variable during emission time (to make it more dynamic)
103   you may want to use the animation class
104*/
105
Note: See TracBrowser for help on using the repository browser.