Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain/src/world_entities/particles/plane_emitter.h @ 10330

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

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.3 KB
Line 
1/*!
2 * @file plane_emitter.h
3 * Definition of a PlaneEmitter
4 */
5
6#ifndef _PLANE_EMITTER_H
7#define _PLANE_EMITTER_H
8
9#include "particle_emitter.h"
10
11#include "vector2D.h"
12
13#define PLANE_EMITTER_DEFAULT_SIZE Vector2D(1.0f, 1.0f)
14
15//! A class to handle a Plane Emitter.
16/**
17 * A Plane Emitter is a special kind of emitter, that has the (underlying) PNode
18 * at its center, and from there on is a Plane in the Direction of the PNode
19 * out around size in the corresponding directions in x and z
20 */
21class PlaneEmitter : public ParticleEmitter
22{
23  ObjectListDeclaration(PlaneEmitter);
24
25  friend class ParticleSystem;
26public:
27  PlaneEmitter(const Vector2D& size = PLANE_EMITTER_DEFAULT_SIZE,
28               float emissionRate = PARTICLE_EMITTER_DEFAULT_EMISSION_RATE,
29               float velocity = PARTICLE_EMITTER_DEFAULT_VELOCITY,
30               float angle = PARTICLE_EMITTER_DEFAULT_SPREAD);
31  PlaneEmitter(const TiXmlElement* root);
32  virtual ~PlaneEmitter();
33
34  virtual void loadParams(const TiXmlElement* root);
35
36  void setSize(float x, float y);
37  void setSize(const Vector2D& size) { this->setSize(size.x, size.y); };
38
39protected:
40  virtual void emitParticles(unsigned int count) const;
41
42private:
43  void init();
44
45private:
46  Vector2D      size;
47};
48
49#endif /* _PLANE_EMITTER_H */
Note: See TracBrowser for help on using the repository browser.