Index: /orxonox/branches/physics/src/subprojects/particles/framework.cc
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4299)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4300)
@@ -24,4 +24,5 @@
 #include "debug.h"
 #include "graphics_engine.h"
+#include "light.h"
 #include "resource_manager.h"
 #include "camera.h"
@@ -41,5 +42,5 @@
 
       // Draw the scene
-      draw(dt);      
+      draw(dt);
     }
 }
@@ -58,17 +59,13 @@
 
 }
+
+
 float Framework::tick()
 {
   currFrame = SDL_GetTicks();
-  float dt = (float)(currFrame - lastFrame) /1000.0;
-  if (dt == 0)
-    dist += (zoomTo-dist);
-  else 
-    dist += (zoomTo-dist) *(float)dt;
-  rotatorP += rotatorV *(float)dt;
+  float dt = (float)(currFrame - lastFrame) / 1000.0;
+  lastFrame = currFrame;
 
   ParticleEngine::getInstance()->tick(dt);
-
-  lastFrame = currFrame;
 
   NullParent::getInstance()->update(dt);
@@ -121,4 +118,5 @@
 	      p1 = p2;
 	    */
+	    
 
 	  }
@@ -128,22 +126,28 @@
 	  {
 	    PRINTF(4)("MouseWheel up\n");
-	    zoomTo *= .5;
+	    //      zoomTo *= .5;
 	  }
 	else if (event.button.button == 5)
 	  {
 	    PRINTF(4)("MouseWheel down\n");
-	    zoomTo *= 2.0;
+	    //	    zoomTo *= 2.0;
 	  }
 	else if (event.button.button == 1)
 	  {
 	    mouse1Down = true;
-	    int mX = event.button.x;
-	    int mY = event.button.y;
-	    int wH = GraphicsEngine::getInstance()->getResolutionY();
-	    int wW = GraphicsEngine::getInstance()->getResolutionX();
-	    Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
-	    p1 = tmpV-M;
-	    p1.y = -p1.y;
-
+	    movement[0] = event.button.x;
+	    movement[1] = event.button.y;
+	    movement[2] = 0;
+	    movement[3] = 0;
+	    printf("test %d %d\n", movement[0], movement[1]);
+	    /*
+	      int mX = event.button.x;
+	      int mY = event.button.y;
+	      int wH = GraphicsEngine::getInstance()->getResolutionY();
+	      int wW = GraphicsEngine::getInstance()->getResolutionX();
+	      Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
+	      p1 = tmpV-M;
+	      p1.y = -p1.y;
+	    */
 	  }
 	else
@@ -151,5 +155,4 @@
 	    PRINTF(0)("MouseButton %d pressed at (%d,%d).\n",
 		   event.button.button, event.button.x, event.button.y);
-	    rotatorV = ( (float)GraphicsEngine::getInstance()->getResolutionY()/2 -event.button.x) / (float)GraphicsEngine::getInstance()->getResolutionY() / 100.0;
 	  }
 	    
@@ -181,9 +184,9 @@
 	    break;
 	  case SDLK_a:
-	    zoomTo /=2;
+	    //zoomTo /=2;
 	    break;
 	  case SDLK_z:
-	    zoomTo *=2;
-
+	    //zoomTo *=2;
+	    break;
 	  }
 	break;
@@ -210,5 +213,5 @@
 
 
- Framework::Framework()
+Framework::Framework()
 {
 
@@ -219,38 +222,7 @@
   
 
-  M = Vector(GraphicsEngine::getInstance()->getResolutionY()/2, GraphicsEngine::getInstance()->getResolutionX()/2, 0); 
-  rotAxis = Vector (0.0,1.0,0.0);
-  rotAngle = 0;
-
-  matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1;
-  rotQ = Quaternion (rotAngle, rotAxis);
-  rotQlast = rotQ;
-  dir = Vector (0.0, 0.0, 1.0);
-  up = Vector (0.0, 1.0, 0.0);
-
-  glEnable(GL_LIGHTING);
-  glEnable(GL_DEPTH_TEST);
-
-  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
-  GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0};
-  GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0};
-  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
-
-  glEnable(GL_LIGHT0);
-  glLightfv(GL_LIGHT0, GL_POSITION, light0Position);
-  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
-  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
-  
-  glEnable(GL_LIGHT1);
-  glLightfv(GL_LIGHT1, GL_POSITION, light1Position);
-  glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight);
-  glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight);
-  
-
+  LightManager::getInstance();
   glEnable(GL_TEXTURE_2D);
-  rotatorP = .0;
-  rotatorV = .0;
-  dist = 5.0;
-  zoomTo = dist;
+
   // Build the font from a TGA image font.tga in the data directory
   // Hide the mouse cursor
@@ -260,13 +232,13 @@
   ResourceManager::getInstance()->setDataDir(DATA_DIRECTORY);
  
-    // Creating a Test Particle System
+  // Creating a Test Particle System
   ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
   system->setLifeSpan(5);
-  system->setConserve(1);
+  system->setConserve(.99);
   system->setRadius(4, 3, 1, 2);
   system->setColor(.5,0,0,.5, 1,1,0,1, 0,0,0,0);
 
   // Creating a Test Particle Emitter
-  ParticleEmitter* emitter = new ParticleEmitter(Vector(0 , 1, 0), 0, 100, .01);
+  ParticleEmitter* emitter = new ParticleEmitter(Vector(0 , 1, 0), M_PI_4, 20, .1);
   emitter->setType(EMITTER_DOT  );
   emitter->setSize(0);
Index: /orxonox/branches/physics/src/subprojects/particles/framework.h
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.h	(revision 4299)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.h	(revision 4300)
@@ -13,28 +13,13 @@
  private:
   Camera* camera;
-  float rotatorP;
-  float rotatorV;
   
-  float dist;
-  float zoomTo;
+  int movement [4];
   
   Uint32 lastFrame;
   Uint32 currFrame;
-  
-  Vector dir;
-  Vector up;
-  
-  float matQ[4][4];
-  
-  Vector M;
-  Vector p1;
-  Vector p2;
-  Vector rotAxis;
-  float rotAngle;
-  Quaternion rotQ;
-  Quaternion rotQlast;
-  
+    
   Uint8* keys; // This variable will be used in the keyboard routine
   bool mouse1Down;
+  bool mouse2Down;
 
  public:
