Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/particles/box_emitter.h @ 6825

Last change on this file since 6825 was 6825, checked in by bensch, 18 years ago

trunk: new interface to ParticleEmitters

File size: 974 bytes
RevLine 
[4597]1/*!
[6823]2 * @file box_emitter.h
3 *  Definition of a BoxEmitter
[6822]4 */
[3926]5
[6823]6#ifndef _BOX_EMITTER_H
7#define _BOX_EMITTER_H
[3926]8
[6822]9#include "particle_emitter.h"
[3926]10
[6825]11#define BOX_EMITTER_DEFAULT_SIZE Vector(1.0f, 1.0f, 1.0f)
12
[4381]13//! A class to handle an Emitter.
[6823]14class BoxEmitter : public ParticleEmitter
[6619]15{
16  friend class ParticleSystem;
17public:
[6825]18  BoxEmitter(const Vector& size = BOX_EMITTER_DEFAULT_SIZE,
19             float emissionRate = PARTICLE_EMITTER_DEFAULT_EMISSION_RATE,
20             float velocity = PARTICLE_EMITTER_DEFAULT_VELOCITY,
21             float angle = PARTICLE_EMITTER_DEFAULT_SPREAD);
[6823]22  BoxEmitter(const TiXmlElement* root);
23  virtual ~BoxEmitter();
[4597]24
[6823]25  virtual void loadParams(const TiXmlElement* root);
[3926]26
[6823]27  void setSize(float x, float y, float z);
28  void setSize(const Vector& size) { this->setSize(size.x, size.y, size.z); };
[3927]29
[6825]30protected:
[6822]31  virtual void emitParticles(unsigned int count) const;
[6619]32
[6822]33private:
34  void init();
[3929]35
[6619]36private:
[6823]37  Vector      size;
[3926]38};
39
[6823]40#endif /* _BOX_EMITTER_H */
Note: See TracBrowser for help on using the repository browser.