Index: /orxonox/branches/parenting/src/track_manager.cc
===================================================================
--- /orxonox/branches/parenting/src/track_manager.cc	(revision 3349)
+++ /orxonox/branches/parenting/src/track_manager.cc	(revision 3350)
@@ -226,7 +226,8 @@
       this->currentTrackElem->isFresh = false;
       if(this->currentTrackElem != this->firstTrackElem)
-	this->addPoint(this->currentTrackElem->startPoint);
-	this->addPoint(this->currentTrackElem->startTangentPoint);
-      
+	{
+	  this->addPoint(this->currentTrackElem->startPoint);
+	  this->addPoint(this->currentTrackElem->startTangentPoint);
+	}
     }
   this->currentTrackElem->curve->addNode(newPoint);
@@ -409,2 +410,63 @@
 }
 
+
+
+// DEBUG //
+
+/**
+   \brief Imports a model of the Graph into the OpenGL-environment.
+   \param dt The Iterator used in seconds for Painting the Graph.
+
+   This is for testing facility only. Do this if you want to see the Path inside the Level.
+   eventually this will all be packed into a gl-list.
+*/
+void TrackManager::drawGraph(float dt) const
+{
+  glBegin(GL_LINES);
+  for (int i = 1; i <= trackElemCount; i++)
+    {
+      TrackElement* tmpElem = this->findTrackElementByID(i);
+      printf("Element: %i\n", tmpElem->ID);
+      if (tmpElem->curve)
+	for(float f = 0.0; f < 1.0; f+=dt)
+	  {
+	    //      printf("%f, %f, %f\n",trackManager->calcPos().x, trackManager->calcPos().y, trackManager->calcPos().z);
+	    Vector tmpVector = tmpElem->curve->calcPos(f);
+	    glVertex3f(tmpVector.x, tmpVector.y, tmpVector.z);
+	  }
+    }
+  glEnd();
+  
+  
+}
+
+void TrackManager::debug(unsigned int level) const
+{
+  printf("::CLASS TRACKMANAGER::debug information::\n");
+  //  printf("Status is: %
+  printf(" Consists of %d elements\n", this->trackElemCount);
+  printf(" localTime is: %f\n", this->localTime);
+  if (level >= 2)
+    {
+      for (int i = 1; i <= trackElemCount; i++)
+	{
+	  TrackElement* tmpElem = this->findTrackElementByID(i);
+	  printf("  ::TrackElement:%i::", tmpElem->ID);
+	  if(tmpElem->name)
+	    printf("name:%s::", tmpElem->name);
+	  printf("\n   TimeTable: starting at = %f; ends at = %f; duration = %f\n", tmpElem->startingTime, tmpElem->startingTime+tmpElem->duration, tmpElem->duration);
+	  printf("   consists of %d Points\n", tmpElem->nodeCount);
+
+	  if(tmpElem->isFresh)
+	    printf("   has not jet eddited in any way\n");
+	  if(tmpElem->isSavePoint)
+	    printf("   is a SavePoint\n");
+	  if(tmpElem->isFork)
+	    printf("   is A Fork with with %d children\n", tmpElem->childCount);
+	  if(tmpElem->isJoined)
+	    printf("   is Joined at the End\n");
+
+		   
+	}
+    }
+}
Index: /orxonox/branches/parenting/src/track_manager.h
===================================================================
--- /orxonox/branches/parenting/src/track_manager.h	(revision 3349)
+++ /orxonox/branches/parenting/src/track_manager.h	(revision 3350)
@@ -106,5 +106,5 @@
 
   TrackElement* findTrackElementByID(unsigned int trackID) const;
-
+  
  public:
   ~TrackManager(void);
@@ -131,4 +131,7 @@
   void choosePath(int graphID);
 
+  // DEBUG //
+  void drawGraph(float dt) const;
+  void debug(unsigned int level) const;
 };
 
Index: /orxonox/branches/parenting/src/world.cc
===================================================================
--- /orxonox/branches/parenting/src/world.cc	(revision 3349)
+++ /orxonox/branches/parenting/src/world.cc	(revision 3350)
@@ -236,4 +236,11 @@
       trackManager->addPoint(Vector(80,0,-10));
       trackManager->addPoint(Vector(90,0,-10));
+      trackManager->setDuration(.5);
+      trackManager->setSavePoint();
+      trackManager->addPoint(Vector(110,0,5));
+      trackManager->addPoint(Vector(120,0, 10));
+      trackManager->addPoint(Vector(130,0, 10));
+      trackManager->addPoint(Vector(140,0,-10));
+      trackManager->addPoint(Vector(150,0,-10));
       trackManager->setDuration(.5);
       
@@ -548,13 +555,10 @@
     }
   glEnd();
+
+  trackManager->drawGraph(.01);
+  trackManager->debug(2);
+  /*
+  glBegin(GL_LINES);
   float i;
-  glBegin(GL_LINES);
-  for(i = 0.0; i<1; i+=.01)
-    {
-      trackManager->tick (.01);
-      printf("%f, %f, %f\n",trackManager->calcPos().x, trackManager->calcPos().y, trackManager->calcPos().z);
-      glVertex3f(trackManager->calcPos().x, trackManager->calcPos().y, trackManager->calcPos().z);
-    }
-  /*
   for(i = 0.0; i<1; i+=.01)
     {
