Index: orxonox/branches/parenting/src/Makefile.am
===================================================================
--- orxonox/branches/parenting/src/Makefile.am	(revision 3310)
+++ orxonox/branches/parenting/src/Makefile.am	(revision 3311)
@@ -31,5 +31,6 @@
 		 null_parent.cc \
 		 base_object.cc \
-		 helper_parent.cc
+		 helper_parent.cc \
+		 track_manager.cc 
 
 noinst_HEADERS = ability.h \
@@ -68,5 +69,6 @@
 		 null_parent.h \
 		 base_object.h \
-		 helper_parent.h
+		 helper_parent.h \
+		 track_manager.h
 
 
Index: orxonox/branches/parenting/src/Makefile.in
===================================================================
--- orxonox/branches/parenting/src/Makefile.in	(revision 3310)
+++ orxonox/branches/parenting/src/Makefile.in	(revision 3311)
@@ -62,5 +62,5 @@
 	material.$(OBJEXT) list.$(OBJEXT) p_node.$(OBJEXT) \
 	null_parent.$(OBJEXT) base_object.$(OBJEXT) \
-	helper_parent.$(OBJEXT)
+	helper_parent.$(OBJEXT) track_manager.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -82,6 +82,7 @@
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/story_entity.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/track.Po ./$(DEPDIR)/vector.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
+@AMDEP_TRUE@	./$(DEPDIR)/track.Po ./$(DEPDIR)/track_manager.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/world_entity.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -225,5 +226,6 @@
 		 null_parent.cc \
 		 base_object.cc \
-		 helper_parent.cc
+		 helper_parent.cc \
+		 track_manager.cc 
 
 noinst_HEADERS = ability.h \
@@ -262,5 +264,6 @@
 		 null_parent.h \
 		 base_object.h \
-		 helper_parent.h
+		 helper_parent.h \
+		 track_manager.h
 
 EXTRA_DIST = orxonox.conf
@@ -362,4 +365,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
Index: orxonox/branches/parenting/src/curve.cc
===================================================================
--- orxonox/branches/parenting/src/curve.cc	(revision 3310)
+++ orxonox/branches/parenting/src/curve.cc	(revision 3311)
@@ -11,9 +11,11 @@
    ### File Specific:
    main-programmer: Benjamin Grauer
-   co-programmer: ...
+   co-programmer: Patrick Boenzli
+
+   ADD: Patrick Boenzli           B-Spline 
+
 
    TODO: 
      local-Time implementation
-     closed Bezier Curve
      NURBS
      
Index: orxonox/branches/parenting/src/curve.h
===================================================================
--- orxonox/branches/parenting/src/curve.h	(revision 3310)
+++ orxonox/branches/parenting/src/curve.h	(revision 3311)
@@ -1,2 +1,3 @@
+
 /*! 
     \file curve.h
@@ -57,4 +58,16 @@
 };
 
+
+//! B-Spline
+/**
+   class to handle b-spline in 3d space
+*/
+class BSplieCurve : public Curve
+{
+
+
+};
+
+
 int ncr(int n, int i);
 
Index: orxonox/branches/parenting/src/null_parent.cc
===================================================================
--- orxonox/branches/parenting/src/null_parent.cc	(revision 3310)
+++ orxonox/branches/parenting/src/null_parent.cc	(revision 3311)
@@ -22,4 +22,12 @@
 using namespace std;
 
+NullParent* NullParent::singletonRef = 0;
+
+NullParent* NullParent::getInstance ()
+{
+  if( singletonRef == NULL)
+    singletonRef = new NullParent ();
+  return singletonRef;
+}
 
 /**
@@ -48,5 +56,9 @@
    \todo this deconstructor is not jet implemented - do it
 */
-NullParent::~NullParent () {}
+NullParent::~NullParent () 
+{
+  delete singletonRef;
+  singletonRef = NULL;
+}
 
 
Index: orxonox/branches/parenting/src/null_parent.h
===================================================================
--- orxonox/branches/parenting/src/null_parent.h	(revision 3310)
+++ orxonox/branches/parenting/src/null_parent.h	(revision 3311)
@@ -15,9 +15,14 @@
 
  public:
+  static NullParent* getInstance ();
+  ~NullParent ();
+  
+  static NullParent* singletonRef;
+
+  virtual void update (float timeStamp);
+
+ private:
   NullParent ();
   NullParent (Vector* absCoordinate);
-  ~NullParent ();
-
-  virtual void update (float timeStamp);
 
 };
Index: orxonox/branches/parenting/src/track_manager.cc
===================================================================
--- orxonox/branches/parenting/src/track_manager.cc	(revision 3311)
+++ orxonox/branches/parenting/src/track_manager.cc	(revision 3311)
@@ -0,0 +1,42 @@
+
+
+/* 
+   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: Patrick Boenzli
+   co-programmer: ...
+*/
+
+
+#include "track_manager.h"
+
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+
+   \todo this constructor is not jet implemented - do it
+*/
+TrackManager::TrackManager () 
+{
+   this->setClassName ("TrackManager");
+}
+
+
+/**
+   \brief standard deconstructor
+
+   \todo this deconstructor is not jet implemented - do it
+*/
+TrackManager::~TrackManager () {}
+
Index: orxonox/branches/parenting/src/track_manager.h
===================================================================
--- orxonox/branches/parenting/src/track_manager.h	(revision 3311)
+++ orxonox/branches/parenting/src/track_manager.h	(revision 3311)
@@ -0,0 +1,27 @@
+/*! 
+    \file track_manager.h
+    \brief manages all tracks defined in the world and the path the player takes
+
+    it is a container for all tracks and all track-nodes. it manages the movement of
+    the track helper-parent (that drives the player). it is responsable for calculating
+    smooth curves etc.
+*/
+
+
+#ifndef _TRACK_MANAGER_H
+#define _TRACK_MANAGER_H
+
+#include "stdincl.h"
+
+
+class TrackManager : public BaseObject {
+
+ public:
+  TrackManager ();
+  ~TrackManager ();
+
+
+
+};
+
+#endif /* _TRACK_MANAGER_H */
Index: orxonox/branches/parenting/src/world.cc
===================================================================
--- orxonox/branches/parenting/src/world.cc	(revision 3310)
+++ orxonox/branches/parenting/src/world.cc	(revision 3311)
@@ -25,4 +25,5 @@
 #include "p_node.h"
 #include "null_parent.h"
+#include "helper_parent.h"
 
 using namespace std;
@@ -84,4 +85,8 @@
 }
 
+GLfloat ctrlpoints[4][3] = {
+  {20.0, 10.0, 5.0}, {40.0, -10.0, 0.0},
+  {60.0, -10.0, 5.0}, {80.0, 10.0, 5.0}};
+
 
 ErrorMessage World::init()
@@ -92,7 +97,13 @@
   cn->enable(true);
 
-  /* this is only for test purposes */
-  this->debug ();
-}
+  glMap1f (GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]);
+  glEnable (GL_MAP1_VERTEX_3);
+  
+  //theNurb = gluNewNurbsRenderer ();
+  //gluNurbsProperty (theNurb, GLU_NURBS_MODE, GLU_NURBS_TESSELLATOR);
+  //gluNurbsProperty (theNurb, GLU_NURBS_VERTEX, vertexCallback );
+}
+
+
 
 ErrorMessage World::start()
@@ -124,4 +135,7 @@
 
 }
+
+
+
 
 void World::load()
@@ -139,5 +153,5 @@
 	case DEBUG_WORLD_0:
 	  {
-	    this->nullParent = new NullParent ();
+	    this->nullParent = NullParent::getInstance ();
 	    this->nullParent->setName ("NullParent");
 
@@ -160,12 +174,16 @@
 	    // !\todo old track-system has to be removed
 
+	    //create helper for player
+	    HelperParent* hp = new HelperParent ();
+	    /* the player has to be added to this helper */
+
 	    // create a player
-	    WorldEntity* myPlayer = new Player();
+	    WorldEntity* myPlayer = new Player ();
 	    myPlayer->setName ("player");
-	    this->spawn(myPlayer);
+	    this->spawn (myPlayer);
 	    this->localPlayer = myPlayer;	    
 
 	    // bind input
-	    Orxonox *orx = Orxonox::getInstance();
+	    Orxonox *orx = Orxonox::getInstance ();
 	    orx->getLocalInput()->bind (myPlayer);
 	    
@@ -188,5 +206,6 @@
 	case DEBUG_WORLD_1:
 	  {
-	    this->nullParent = new NullParent ();
+	    this->nullParent = NullParent::getInstance ();
+	    this->nullParent->setName ("NullParent");
 
 	    // create some path nodes
@@ -199,4 +218,7 @@
 	    this->pathnodes[5] = Vector(30, 50, 0);
 	    
+
+
+
 	    // create the tracks
 	    this->tracklen = 6;
@@ -400,5 +422,5 @@
   //draw track
   glBegin(GL_LINES);
-  glColor3f(0,1,1);
+  glColor3f(0.0, 1.0, 1.0);
   for( int i = 0; i < tracklen; i++)
     {
@@ -407,4 +429,13 @@
     }
   glEnd();
+
+  glBegin(GL_LINE_STRIP);
+  glColor3f(1.0, 5.0, 1.0);
+  for( int i = 0; i <= 30; i++)
+    {
+      glEvalCoord1f ((GLfloat) i/30.0);
+    }
+  glEnd();
+
   glEndList();
 }
@@ -470,5 +501,4 @@
   // draw debug coord system
   glCallList (objectList);
-
 
 }
@@ -595,5 +625,5 @@
 {
   printf ("World::debug() - starting debug\n");
-  PNode* p1 = new NullParent ();
+  PNode* p1 = NullParent::getInstance ();
   PNode* p2 = new PNode (new Vector(2, 2, 2), p1);
   PNode* p3 = new PNode (new Vector(4, 4, 4), p1);
Index: orxonox/branches/parenting/src/world.h
===================================================================
--- orxonox/branches/parenting/src/world.h	(revision 3310)
+++ orxonox/branches/parenting/src/world.h	(revision 3311)
@@ -38,4 +38,6 @@
   virtual void load ();
   virtual void destroy ();
+
+  //static void vertexCallback (GLfloat* vertex);
 
   void timeSlice (Uint32 deltaT);
