Index: trunk/src/lib/particles/Makefile.am
===================================================================
--- trunk/src/lib/particles/Makefile.am	(revision 6846)
+++ trunk/src/lib/particles/Makefile.am	(revision 6873)
@@ -8,4 +8,5 @@
 			dot_emitter.cc \
 			box_emitter.cc \
+			plane_emitter.cc \
 			\
 			particle_system.cc \
@@ -22,4 +23,5 @@
 			dot_emitter.h \
 			box_emitter.h \
+			plane_emitter.h \
 			\
 			particle_system.h \
Index: trunk/src/lib/particles/plane_emitter.cc
===================================================================
--- trunk/src/lib/particles/plane_emitter.cc	(revision 6873)
+++ trunk/src/lib/particles/plane_emitter.cc	(revision 6873)
@@ -0,0 +1,117 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: Patrick Boenzli
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
+
+#include "plane_emitter.h"
+
+#include "particle_system.h"
+
+#include "load_param.h"
+#include "factory.h"
+#include "debug.h"
+#include "stdlibincl.h"
+
+using namespace std;
+
+
+CREATE_FACTORY(PlaneEmitter, CL_PLANE_EMITTER);
+
+/**
+ *  standard constructor
+*/
+PlaneEmitter::PlaneEmitter(const Vector2D& size, float emissionRate, float velocity, float angle)
+    :  ParticleEmitter(emissionRate, velocity, angle)
+{
+  this->init();
+  this->setSize(size);
+}
+
+/**
+ *  constructs and loads a PlaneEmitter from a XML-element
+ * @param root the XML-element to load from
+*/
+PlaneEmitter::PlaneEmitter(const TiXmlElement* root)
+    : ParticleEmitter()
+{
+  this->init();
+
+  if (root != NULL)
+    this->loadParams(root);
+}
+
+/**
+ *  standard destructor
+
+   removes the EmitterSystem from the ParticleEngine
+*/
+PlaneEmitter::~PlaneEmitter ()
+{
+  this->setSystem(NULL);
+}
+
+/**
+  @brief initializes default values of a ParitcleEmitter
+*/
+void PlaneEmitter::init()
+{
+  this->setClassID(CL_PLANE_EMITTER, "PlaneEmitter");
+  this->setSize(1.0f, 1.0f);
+}
+
+void PlaneEmitter::loadParams(const TiXmlElement* root)
+{
+  ParticleEmitter::loadParams(root);
+
+  LoadParam(root, "size", this, PlaneEmitter, setSize)
+  .describe("The Size of the PlaneEmitter: x, y")
+  .defaultValues(2, 1.0f,1.0f);
+}
+
+void PlaneEmitter::setSize(float x, float y)
+{
+  this->size = Vector2D(x, y);
+}
+
+
+void PlaneEmitter::emitParticles(unsigned int count) const
+{
+  Vector inheritVelocity = this->getVelocity() * this->inheritSpeed;
+
+  Vector xDir = this->getAbsDirX() * this->size.x;
+  Vector yDir = this->getAbsDirZ() * this->size.y;
+  Vector zDir = this->getAbsDirY();
+
+  for (unsigned int i = 0; i < count; i++)
+  {
+    Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
+    randDir.normalize();
+    randDir = (Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(zDir);
+    Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
+
+    Vector plane = this->getAbsCoor() +
+        xDir * ((float)rand()/RAND_MAX -.5) +
+        yDir * ((float)rand()/RAND_MAX -.5);
+
+    // ROTATIONAL CALCULATION (this must not be done for all types of particles.)
+    randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
+    randDir.normalize();
+    Quaternion orient = Quaternion(M_PI, randDir);
+    Quaternion moment = Quaternion(this->momentum + this->momentumRandom, randDir);
+
+    this->getSystem()->addParticle(plane, velocityV, orient, moment);
+
+  }
+}
Index: trunk/src/lib/particles/plane_emitter.h
===================================================================
--- trunk/src/lib/particles/plane_emitter.h	(revision 6873)
+++ trunk/src/lib/particles/plane_emitter.h	(revision 6873)
@@ -0,0 +1,47 @@
+/*!
+ * @file plane_emitter.h
+ * Definition of a PlaneEmitter
+ */
+
+#ifndef _PLANE_EMITTER_H
+#define _PLANE_EMITTER_H
+
+#include "particle_emitter.h"
+
+#include "vector2D.h"
+
+#define PLANE_EMITTER_DEFAULT_SIZE Vector2D(1.0f, 1.0f)
+
+//! A class to handle a Plane Emitter.
+/**
+ * A Plane Emitter is a special kind of emitter, that has the (underlying) PNode
+ * at its center, and from there on is a Plane in the Direction of the PNode
+ * out around size in the corresponding directions in x and z
+ */
+class PlaneEmitter : public ParticleEmitter
+{
+  friend class ParticleSystem;
+public:
+  PlaneEmitter(const Vector2D& size = PLANE_EMITTER_DEFAULT_SIZE,
+             float emissionRate = PARTICLE_EMITTER_DEFAULT_EMISSION_RATE,
+             float velocity = PARTICLE_EMITTER_DEFAULT_VELOCITY,
+             float angle = PARTICLE_EMITTER_DEFAULT_SPREAD);
+  PlaneEmitter(const TiXmlElement* root);
+  virtual ~PlaneEmitter();
+
+  virtual void loadParams(const TiXmlElement* root);
+
+  void setSize(float x, float y);
+  void setSize(const Vector2D& size) { this->setSize(size.x, size.y); };
+
+protected:
+  virtual void emitParticles(unsigned int count) const;
+
+private:
+  void init();
+
+private:
+  Vector2D      size;
+};
+
+#endif /* _PLANE_EMITTER_H */
