Index: /orxonox/branches/parenting/configure
===================================================================
--- /orxonox/branches/parenting/configure	(revision 3318)
+++ /orxonox/branches/parenting/configure	(revision 3319)
@@ -1,5 +1,5 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for orxonox 2.0.1-pre-alpha.
+# Generated by GNU Autoconf 2.59 for orxonox 0.2.1-pre-alpha.
 #
 # Report bugs to <orxonox-dev at mail.datacore.ch>.
@@ -270,6 +270,6 @@
 PACKAGE_NAME='orxonox'
 PACKAGE_TARNAME='orxonox'
-PACKAGE_VERSION='2.0.1-pre-alpha'
-PACKAGE_STRING='orxonox 2.0.1-pre-alpha'
+PACKAGE_VERSION='0.2.1-pre-alpha'
+PACKAGE_STRING='orxonox 0.2.1-pre-alpha'
 PACKAGE_BUGREPORT='orxonox-dev at mail.datacore.ch'
 
@@ -789,5 +789,5 @@
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures orxonox 2.0.1-pre-alpha to adapt to many kinds of systems.
+\`configure' configures orxonox 0.2.1-pre-alpha to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -856,5 +856,5 @@
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of orxonox 2.0.1-pre-alpha:";;
+     short | recursive ) echo "Configuration of orxonox 0.2.1-pre-alpha:";;
    esac
   cat <<\_ACEOF
@@ -984,5 +984,5 @@
 if $ac_init_version; then
   cat <<\_ACEOF
-orxonox configure 2.0.1-pre-alpha
+orxonox configure 0.2.1-pre-alpha
 generated by GNU Autoconf 2.59
 
@@ -998,5 +998,5 @@
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by orxonox $as_me 2.0.1-pre-alpha, which was
+It was created by orxonox $as_me 0.2.1-pre-alpha, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
@@ -1719,5 +1719,5 @@
 # Define the identity of the package.
  PACKAGE='orxonox'
- VERSION='2.0.1-pre-alpha'
+ VERSION='0.2.1-pre-alpha'
 
 
@@ -7946,5 +7946,5 @@
 cat >&5 <<_CSEOF
 
-This file was extended by orxonox $as_me 2.0.1-pre-alpha, which was
+This file was extended by orxonox $as_me 0.2.1-pre-alpha, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
@@ -8009,5 +8009,5 @@
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-orxonox config.status 2.0.1-pre-alpha
+orxonox config.status 0.2.1-pre-alpha
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Index: /orxonox/branches/parenting/src/Makefile.am
===================================================================
--- /orxonox/branches/parenting/src/Makefile.am	(revision 3318)
+++ /orxonox/branches/parenting/src/Makefile.am	(revision 3319)
@@ -32,5 +32,6 @@
 		 base_object.cc \
 		 helper_parent.cc \
-		 track_manager.cc 
+		 track_manager.cc \
+		 curve.cc
 
 noinst_HEADERS = ability.h \
@@ -70,5 +71,6 @@
 		 base_object.h \
 		 helper_parent.h \
-		 track_manager.h
+		 track_manager.h \
+		 curve.h
 
 
Index: /orxonox/branches/parenting/src/Makefile.in
===================================================================
--- /orxonox/branches/parenting/src/Makefile.in	(revision 3318)
+++ /orxonox/branches/parenting/src/Makefile.in	(revision 3319)
@@ -62,5 +62,6 @@
 	material.$(OBJEXT) list.$(OBJEXT) p_node.$(OBJEXT) \
 	null_parent.$(OBJEXT) base_object.$(OBJEXT) \
-	helper_parent.$(OBJEXT) track_manager.$(OBJEXT)
+	helper_parent.$(OBJEXT) track_manager.$(OBJEXT) \
+	curve.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -72,5 +73,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po ./$(DEPDIR)/curve.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/environment.Po \
@@ -227,5 +228,6 @@
 		 base_object.cc \
 		 helper_parent.cc \
-		 track_manager.cc 
+		 track_manager.cc \
+		 curve.cc
 
 noinst_HEADERS = ability.h \
@@ -265,5 +267,6 @@
 		 base_object.h \
 		 helper_parent.h \
-		 track_manager.h
+		 track_manager.h \
+		 curve.h
 
 EXTRA_DIST = orxonox.conf
@@ -350,4 +353,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@
Index: /orxonox/branches/parenting/src/curve.cc
===================================================================
--- /orxonox/branches/parenting/src/curve.cc	(revision 3318)
+++ /orxonox/branches/parenting/src/curve.cc	(revision 3319)
@@ -156,5 +156,5 @@
   \return a Vector to the calculated position
 */
-Vector BezierCurve::getPos() const
+Vector BezierCurve::getPos(void) const
 {
   return curvePoint;
Index: /orxonox/branches/parenting/src/curve.h
===================================================================
--- /orxonox/branches/parenting/src/curve.h	(revision 3318)
+++ /orxonox/branches/parenting/src/curve.h	(revision 3319)
@@ -55,5 +55,5 @@
   
   
-  Vector getPos () const;
+  Vector getPos(void) const;
 };
 
Index: /orxonox/branches/parenting/src/stdincl.h
===================================================================
--- /orxonox/branches/parenting/src/stdincl.h	(revision 3318)
+++ /orxonox/branches/parenting/src/stdincl.h	(revision 3319)
@@ -31,4 +31,5 @@
 
 #include "vector.h"
+#include "curve.h"
 #include "coordinates.h"
 #include "list.h"
Index: /orxonox/branches/parenting/src/vector.cc
===================================================================
--- /orxonox/branches/parenting/src/vector.cc	(revision 3318)
+++ /orxonox/branches/parenting/src/vector.cc	(revision 3319)
@@ -844,122 +844,2 @@
 }
 
-
-/**
-   \brief Creates a new BezierCurve
-*/
-BezierCurve::BezierCurve (void)
-{
-  nodeCount = 0;
-  firstNode = new PathNode;
-  currentNode = firstNode;
-
-  firstNode->position = Vector (.0, .0, .0);
-  firstNode->number = 0;
-  firstNode->next = 0; // not sure if this really points to NULL!!
-
-  return;
-}
-
-/**
-   \brief Deletes a BezierCurve.
-   It does this by freeing all the space taken over from the nodes
-*/
-BezierCurve::~BezierCurve (void)
-{
-  PathNode* tmpNode;
-  currentNode = firstNode;
-  while (tmpNode != 0)
-    {
-      tmpNode = currentNode;
-      currentNode = currentNode->next;
-      delete tmpNode;
-    }
-}
-
-/**
-   \brief adds a new Node to the bezier Curve
-   \param newNode a Vector to the position of the new node
-*/
-void BezierCurve::addNode(const Vector& newNode)
-{
-  PathNode* tmpNode;
-  if (nodeCount == 0 )
-    tmpNode = firstNode;
-  else
-    {
-      tmpNode = new PathNode;
-      currentNode = currentNode->next = tmpNode;
-    }
-  tmpNode->position = newNode;
-  tmpNode->next = 0; // not sure if this really points to NULL!!
-  tmpNode->number = (++nodeCount);
-  return;
-}
-
-/**
-   \brief calculates the Position on the curve
-   \param t The position on the Curve (0<=t<=1)
-   \return the Position on the Path
-*/
-Vector BezierCurve::calcPos(float t) 
-{
-  if (nodeCount <=4)
-    {
-      //      if (verbose >= 1)
-      //      printf ("Please define at least 4 nodes, until now you have only defined %i.\n", nodeCount);
-      curvePoint = Vector(0,0,0);
-    }
-  PathNode* tmpNode = firstNode;
-    
-  int k,kn,nn,nkn;
-  double blend,muk,munk;
-  Vector b = Vector(0.0,0.0,0.0);
-  
-  muk = 1;
-  munk = pow(1-t,(double)nodeCount);
-  
-  for (k=0; k<=nodeCount; k++) {
-    nn = nodeCount;
-    kn = k;
-    nkn = nodeCount - k;
-    blend = muk * munk;
-    muk *= t;
-    munk /= (1-t);
-    while (nn >= 1) {
-      blend *= nn;
-      nn--;
-      if (kn > 1) {
-	blend /= (double)kn;
-	kn--;
-      }
-      if (nkn > 1) {
-	blend /= (double)nkn;
-	nkn--;
-      }
-    }
-    b.x += tmpNode->position.x * blend;
-    b.y += tmpNode->position.y * blend;
-    b.z += tmpNode->position.z * blend;
-
-    tmpNode = tmpNode->next;
-  }
-  return b;
-}
-
-Vector BezierCurve::calcDirection (float t)
-{
-  double diff = .00000000001;
-  
-  Vector diffV = ((calcPos(t+diff) - calcPos(t))/diff);
-  diffV.normalize();
-  return diffV;
-}
-
-/**
-  \brief returns the Position of the point calculated on the Curve
-  \return a Vector to the calculated position
-*/
-Vector BezierCurve::getPos() const
-{
-  return curvePoint;
-}
Index: /orxonox/branches/parenting/src/vector.h
===================================================================
--- /orxonox/branches/parenting/src/vector.h	(revision 3318)
+++ /orxonox/branches/parenting/src/vector.h	(revision 3319)
@@ -149,39 +149,3 @@
 };
 
-
-
-//! Bezier Curve
-/**
-   Class to handle bezier curves in 3-dimesnsional space
-   
-   needed for  the Tracking system in OrxOnoX.
-*/
-class BezierCurve
-{
- private:
-  int nodeCount;
-  Vector curvePoint;
-  
-  struct PathNode
-  {
-    int number;
-    Vector position;
-    PathNode* next;
-  };
-
-  PathNode* firstNode; 
-  PathNode* currentNode; 
-
- public:
-  BezierCurve (void);
-  ~BezierCurve (void);
-  void addNode (const Vector& newNode);
-  Vector calcPos (float t);
-  Vector calcDirection (float t);
-  
-  Vector getPos () const;
-};
-
-
-
 #endif /* _VECTOR_H */
Index: /orxonox/branches/parenting/src/world.cc
===================================================================
--- /orxonox/branches/parenting/src/world.cc	(revision 3318)
+++ /orxonox/branches/parenting/src/world.cc	(revision 3319)
@@ -153,4 +153,11 @@
 	case DEBUG_WORLD_0:
 	  {
+	    testCurve = new BezierCurve();
+	    testCurve->addNode(Vector(0,0,0));
+	    testCurve->addNode(Vector(5,7,0));
+	    testCurve->addNode(Vector(10,-5,0));
+	    testCurve->addNode(Vector(20, 0,10));
+	    testCurve->addNode(Vector(50, 7,-5));
+	    
 	    this->nullParent = NullParent::getInstance ();
 	    this->nullParent->setName ("NullParent");
@@ -438,4 +445,10 @@
   glEnd();
 
+  glBegin(GL_LINES);
+  for(float i=0.0; i<1; i+=.01)
+    {
+      glVertex3f(testCurve->calcPos(i).x, testCurve->calcPos(i).y, testCurve->calcPos(i).z);
+    }
+  glEnd();
   glEndList();
 }
Index: /orxonox/branches/parenting/src/world.h
===================================================================
--- /orxonox/branches/parenting/src/world.h	(revision 3318)
+++ /orxonox/branches/parenting/src/world.h	(revision 3319)
@@ -66,4 +66,6 @@
   Camera* localCamera;  
 
+
+  BezierCurve* testCurve;
  private:
   Uint32 lastFrame; //!> last time of frame
