Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6873 in orxonox.OLD for trunk/src/lib/particles/plane_emitter.h


Ignore:
Timestamp:
Jan 30, 2006, 10:43:00 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Emitter is emitting correctly

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/plane_emitter.h

    r6870 r6873  
    11/*!
    2  * @file box_emitter.h
    3  *  Definition of a BoxEmitter
     2 * @file plane_emitter.h
     3 * Definition of a PlaneEmitter
    44 */
    55
    6 #ifndef _BOX_EMITTER_H
    7 #define _BOX_EMITTER_H
     6#ifndef _PLANE_EMITTER_H
     7#define _PLANE_EMITTER_H
    88
    99#include "particle_emitter.h"
    1010
    11 #define BOX_EMITTER_DEFAULT_SIZE Vector(1.0f, 1.0f, 1.0f)
     11#include "vector2D.h"
    1212
    13 //! A class to handle a Box Emitter.
     13#define PLANE_EMITTER_DEFAULT_SIZE Vector2D(1.0f, 1.0f)
     14
     15//! A class to handle a Plane Emitter.
    1416/**
    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
     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
    1820 */
    19 class BoxEmitter : public ParticleEmitter
     21class PlaneEmitter : public ParticleEmitter
    2022{
    2123  friend class ParticleSystem;
    2224public:
    23   BoxEmitter(const Vector& size = BOX_EMITTER_DEFAULT_SIZE,
     25  PlaneEmitter(const Vector2D& size = PLANE_EMITTER_DEFAULT_SIZE,
    2426             float emissionRate = PARTICLE_EMITTER_DEFAULT_EMISSION_RATE,
    2527             float velocity = PARTICLE_EMITTER_DEFAULT_VELOCITY,
    2628             float angle = PARTICLE_EMITTER_DEFAULT_SPREAD);
    27   BoxEmitter(const TiXmlElement* root);
    28   virtual ~BoxEmitter();
     29  PlaneEmitter(const TiXmlElement* root);
     30  virtual ~PlaneEmitter();
    2931
    3032  virtual void loadParams(const TiXmlElement* root);
    3133
    32   void setSize(float x, float y, float z);
    33   void setSize(const Vector& size) { this->setSize(size.x, size.y, size.z); };
     34  void setSize(float x, float y);
     35  void setSize(const Vector2D& size) { this->setSize(size.x, size.y); };
    3436
    3537protected:
     
    4042
    4143private:
    42   Vector      size;
     44  Vector2D      size;
    4345};
    4446
    45 #endif /* _BOX_EMITTER_H */
     47#endif /* _PLANE_EMITTER_H */
Note: See TracChangeset for help on using the changeset viewer.