Changeset 6825 in orxonox.OLD for trunk/src/lib/particles/particle_emitter.h
- Timestamp:
- Jan 29, 2006, 1:07:01 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/particle_emitter.h
r6822 r6825 18 18 #define PARTICLE_EMITTER_DEFAULT_INHERIT_SPEED 0.0 19 19 #define PARTICLE_EMITTER_DEFAULT_SPREAD M_PI 20 #define PARTICLE_EMITTER_DEFAULT_VELOCITY 1.0 20 21 21 22 //! A class to handle an Emitter. … … 24 25 friend class ParticleSystem; 25 26 public: 26 ParticleEmitter(const Vector& direction = Vector(1.0,0.0,0.0) , float angle = .5, 27 float emissionRate = 1.0, float velocity = 1.0); 27 ParticleEmitter(float emissionRate = PARTICLE_EMITTER_DEFAULT_EMISSION_RATE, 28 float velocity = PARTICLE_EMITTER_DEFAULT_VELOCITY, 29 float angle = PARTICLE_EMITTER_DEFAULT_SPREAD); 28 30 virtual ~ParticleEmitter(); 29 31 … … 45 47 void setEmissionMomentum(float momentum, float randomMomentum = 0.0); 46 48 47 void setDirection(float x, float y, float z) { this->direction = Vector(x,y,z); }; //!< todo this should be done via PNODE48 49 49 /** @returns the emissionRate */ 50 50 inline float getEmissionRate() const { return this->emissionRate; }; … … 58 58 inline float getEmissionMomentum() const { return this->momentum; }; 59 59 60 virtual void emitParticles(unsigned int count) const = 0;61 60 62 61 void debug() const; 63 62 64 63 protected: 64 virtual void emitParticles(unsigned int count) const = 0; 65 65 66 protected: 66 67 float inheritSpeed; //!< How much speed the particle inherits from the Emitters speed. 67 Vector direction; //!< emition direction.68 68 float angle; //!< max angle from the direction of the emitter 69 69 float randomAngle; //!< random emission angle (angle +- angleRandom is the emitted angle.
Note: See TracChangeset
for help on using the changeset viewer.