Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/particles/box_emitter.h @ 9715

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

renamed newclassid to classid and newobjectlist to objectlist

File size: 1.2 KB
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
[6826]13//! A class to handle a Box Emitter.
14/**
15 * A Box Emitter is a special kind of emitter, that has the (underlying) PNode
16 * at its center, and from there on is a Box in the Direction of the PNode
17 * out around size in the corresponding directions
18 */
[6823]19class BoxEmitter : public ParticleEmitter
[6619]20{
[9715]21  ObjectListDeclaration(BoxEmitter);
[6619]22  friend class ParticleSystem;
23public:
[6825]24  BoxEmitter(const Vector& size = BOX_EMITTER_DEFAULT_SIZE,
25             float emissionRate = PARTICLE_EMITTER_DEFAULT_EMISSION_RATE,
26             float velocity = PARTICLE_EMITTER_DEFAULT_VELOCITY,
27             float angle = PARTICLE_EMITTER_DEFAULT_SPREAD);
[6823]28  BoxEmitter(const TiXmlElement* root);
29  virtual ~BoxEmitter();
[4597]30
[6823]31  virtual void loadParams(const TiXmlElement* root);
[3926]32
[6823]33  void setSize(float x, float y, float z);
34  void setSize(const Vector& size) { this->setSize(size.x, size.y, size.z); };
[3927]35
[6825]36protected:
[6822]37  virtual void emitParticles(unsigned int count) const;
[6619]38
[6822]39private:
40  void init();
[3929]41
[6619]42private:
[6823]43  Vector      size;
[3926]44};
45
[6823]46#endif /* _BOX_EMITTER_H */
Note: See TracBrowser for help on using the repository browser.