Index: orxonox/trunk/src/camera.cc
===================================================================
--- orxonox/trunk/src/camera.cc	(revision 3236)
+++ orxonox/trunk/src/camera.cc	(revision 3365)
@@ -42,7 +42,6 @@
   this->t = 0.0;
 
-  this->actualPlace.r.x = 0.0;
-  this->actualPlace.r.y = 10.0;
-  this->actualPlace.r.z = -5.0;
+
+  this->setDrawable (false);
 }
 
@@ -67,5 +66,5 @@
   //printf("time is: t=%f\n", t );
   updateDesiredPlace();
-  jump(NULL);
+  //jump(NULL);
 }
 
@@ -83,4 +82,5 @@
     case ELLIPTICAL:
       {
+	/*
 	//r = actual_place.r 
 	Orxonox *orx = Orxonox::getInstance();
@@ -95,5 +95,4 @@
 	      {
 		Vector *start = new Vector(0.0, 1.0, 0.0);
-		//r = /*actual_place.r*/ *start - plFocus.r;
 		r = *(new Vector(0.0, 5.0, 0.0));
 
@@ -120,37 +119,24 @@
 	    //printf("vector r = %f, %f, %f\n",r.x, r.y, r.z );
 	    rAbs = r.len();
-	    if(t < 30.0) /* FIXME!!*/
+	    if(t < 30)
 	      {
 		ka = rAbs / deltaTime*deltaTime;
 	      }
-	    /* this is the new length of the vector */
-	    //float len = ka * powf((deltaTime - t), 2);
-	    
-	    /* calc the rotation */
-	    /*
-	    Vector axis(0.0, 0.0, 1.0);
-	    if(t < 30.0)
-	      a0 = PI/4 - atanf(fabs(r.x) / fabs(r.y));
-	    printf("a0 = %f\n", a0);
-	    float angle = a0/deltaTime * (deltaTime - t);
-	    printf("angle is: %f\n", angle);
-	    Quaternion q(angle, axis);
-	    */
-	    //r = q.apply(r);
-	    //r = r * (len/r.len());
-	    
-	    //res->quatSlerp(from, to, t/deltaTime, res);
+
 	    res->quatSlerp(to, from, t/deltaTime, res);
 
 	    Vector ursp(0.0, 0.0, 0.0);
-	    desiredPlace.r = /*plFocus.r -*/ ursp - res->apply(r); 
+	    desiredPlace.r =  ursp - res->apply(r); 
 
 	    printf("desired place is: %f, %f, %f\n", desiredPlace.r.x, desiredPlace.r.y, desiredPlace.r.z);
 	    //plLastBPlace = *bound->get_placement();
+	    
 	  } 
+      */
       }
       break;
     case SMOTH_FOLLOW:
       {
+	/*
 	Placement *plBound = bound->getPlacement();
 	Location lcBound;
@@ -160,6 +146,7 @@
 	    Vector vDirection(0.0, 0.0, 1.0);
 	    vDirection = plBound->w.apply(vDirection);
-	    desiredPlace.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0);
+	    desiredPlace.r = (vDirection * ((lcBound.dist-10.0))) + Vector(0,0,5.0);
 	  }
+	*/
 	break;
       }
@@ -167,4 +154,5 @@
     case STICKY:
       {
+	/*
 	if(bound != null)
 	  {
@@ -175,18 +163,21 @@
 	    desiredPlace.r = plBound->r - vDirection*10 + eclipticOffset;
 	  }
+	*/
 	break;
       }
       /* the camera is handled like an entity and rolls on the track */
     case NORMAL:
-      Location lookat;  
       if( bound != NULL && world != NULL )
 	{
-	  bound->getLookat (&lookat);
-	  world->calcCameraPos (&lookat, &desiredPlace);
+	  //FIXME: camera should be made via relative coordinates
+	  Vector* cameraOffset = new Vector (-10, 5, 0);
+	  this->setRelCoor (cameraOffset);
 	} 
       else
 	{
+	  /*
 	  desiredPlace.r = Vector (0,0,0);
 	  desiredPlace.w = Quaternion (); 
+	  */
 	}
       break;
@@ -237,17 +228,18 @@
   // rotation
   float matrix[4][4];
-  actualPlace.w.conjugate().matrix (matrix);
+  //this->absDirection.conjugate().matrix (matrix);
   /* orientation and */
-  glMultMatrixf ((float*)matrix);
+  //glMultMatrixf ((float*)matrix);
+
   /*  translation */
-  glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z);
-//Placement *plBound = bound->get_placement();
+  //glTranslatef (this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z );
+
 
   // ===== second camera control calculation option
-  /*
-   gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z, 
-              plBound->r.x, plBound->r.y, plBound->r.z,
-              0.0, 0.0, 1.0);
-  */
+  
+  gluLookAt(this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z, 
+	    this->parent->getAbsCoor ().x, this->parent->getAbsCoor ().y, this->parent->getAbsCoor ().z,
+	    0.0, 1.0, 0.0);
+  
 
   glMatrixMode (GL_MODELVIEW);
@@ -255,23 +247,5 @@
 }
 
-/**
-  \brief set the camera position
-  \param plc: The Placement to set the camera to 
-	
-	This will set the actual and desired placement of the camera to plc
-*/
-void Camera::jump (Placement* plc = NULL)
-{
-  if( plc == NULL)
-    {
-      actualPlace = desiredPlace;
-      //printf("Camera|jump: camer@ %f, %f, %f\n\n", actual_place.r.x, actual_place.r.y, actual_place.r.z);
-    }
-  else
-    {
-      desiredPlace = *plc;
-      actualPlace = *plc;
-    }
-}
+
 
 /**
