Index: trunk/src/lib/coord/p_node.cc
===================================================================
--- trunk/src/lib/coord/p_node.cc	(revision 6872)
+++ trunk/src/lib/coord/p_node.cc	(revision 6873)
@@ -139,5 +139,5 @@
 
   LoadParam(root, "parent", this, PNode, setParent)
-      .describe("the Name of the Parent of this PNode");
+      .describe("the Name of the Parent to set for this PNode");
 
   LoadParam(root, "parent-mode", this, PNode, setParentMode)
@@ -355,7 +355,7 @@
  * main difference is, that here you give a directional vector, that will be translated into a Quaternion
  */
-void PNode::setRelDir (float x, float y, float z)
-{
-  this->setRelDir(Quaternion(Vector(x,y,z), Vector(0,1,0)));
+void PNode::setRelDir (float angle, float x, float y, float z)
+{
+  this->setRelDir(Quaternion(angle, Vector(x,y,z)));
 }
 
@@ -386,7 +386,7 @@
  * main difference is, that here you give a directional vector, that will be translated into a Quaternion
  */
-void PNode::setRelDirSoft(float x, float y, float z, float bias)
-{
-  this->setRelDirSoft(Quaternion(Vector(x,y,z), Vector(0,1,0)), bias);
+void PNode::setRelDirSoft(float angle, float x, float y, float z, float bias)
+{
+  this->setRelDirSoft(Quaternion(angle, Vector(x,y,z)), bias);
 }
 
@@ -421,7 +421,7 @@
  * main difference is, that here you give a directional vector, that will be translated into a Quaternion
  */
-void PNode::setAbsDir (float x, float y, float z)
-{
-  this->setAbsDir(Quaternion(Vector(x,y,z), Vector(0,1,0)));
+void PNode::setAbsDir (float angle, float x, float y, float z)
+{
+  this->setAbsDir(Quaternion(angle, Vector(x,y,z)));
 }
 
@@ -456,7 +456,7 @@
  * main difference is, that here you give a directional vector, that will be translated into a Quaternion
  */
-void PNode::setAbsDirSoft (float x, float y, float z, float bias)
-{
-  this->setAbsDirSoft(Quaternion(Vector(x,y,z), Vector(0,1,0)), bias);
+void PNode::setAbsDirSoft (float angle, float x, float y, float z, float bias)
+{
+  this->setAbsDirSoft(Quaternion(angle, Vector(x,y,z)), bias);
 }
 
@@ -1319,5 +1319,5 @@
        fabs( rotz - absDirection.v.z ) > __OFFSET_ROT )
     return true;
-  
+
   return false;
 }
Index: trunk/src/lib/coord/p_node.h
===================================================================
--- trunk/src/lib/coord/p_node.h	(revision 6872)
+++ trunk/src/lib/coord/p_node.h	(revision 6873)
@@ -115,7 +115,7 @@
   // ROTATION //
   void setRelDir (const Quaternion& relDir);
-  void setRelDir (float x, float y, float z);
+  void setRelDir (float angle, float x, float y, float z);
   void setRelDirSoft(const Quaternion& relDirSoft, float bias = 1.0);
-  void setRelDirSoft(float x, float y, float z, float bias = 1.0);
+  void setRelDirSoft(float angle, float x, float y, float z, float bias = 1.0);
   /** @returns the relative Direction */
   inline const Quaternion& getRelDir () const { return this->prevRelDirection; };
@@ -125,7 +125,7 @@
   inline Vector getRelDirV() const { return this->prevRelDirection.apply(Vector(0,1,0)); };
   void setAbsDir (const Quaternion& absDir);
-  void setAbsDir (float x, float y, float z);
+  void setAbsDir (float angle, float x, float y, float z);
   void setAbsDirSoft(const Quaternion& absDirSoft, float bias = 1.0);
-  void setAbsDirSoft(float x, float y, float z, float bias = 1.0);
+  void setAbsDirSoft(float angle, float x, float y, float z, float bias = 1.0);
   void shiftDir (const Quaternion& shift);
   /** @returns the absolute Direction */
Index: trunk/src/lib/graphics/effects/graphics_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 6872)
+++ trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 6873)
Index: trunk/src/lib/particles/Makefile.am
===================================================================
--- trunk/src/lib/particles/Makefile.am	(revision 6872)
+++ 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 */
