Index: orxonox/branches/bezierTrack/src/Makefile.am
===================================================================
--- orxonox/branches/bezierTrack/src/Makefile.am	(revision 3021)
+++ orxonox/branches/bezierTrack/src/Makefile.am	(revision 3023)
@@ -7,6 +7,64 @@
 bin_PROGRAMS=orxonox
 
-orxonox_SOURCES=orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc object.cc environment.cc array.cc material.cc list.cc curve.cc
-noinst_HEADERS=ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h object.h array.h material.h list_template.h story_entity.h story_def.h game_loader.h campaign.h curve.h
+orxonox_SOURCES=orxonox.cc \
+		world.cc \
+		player.cc \
+		data_tank.cc \
+		world_entity.cc \
+		vector.cc \
+		camera.cc \
+		collision.cc \
+		command_node.cc \
+		ini_parser.cc \
+		keynames.cc \
+		track.cc \
+		base_entity.cc \
+		game_loader.cc \
+		campaign.cc \
+		story_entity.cc \
+		object.cc \
+		environment.cc \
+		array.cc \
+		material.cc \
+		list.cc \
+		curve.cc \
+		coordinates.cc
+
+noinst_HEADERS=ability.h \
+		data_tank.h \
+		npc.h \
+		stdincl.h \
+		ai.h \
+		environment.h \
+		orxonox.h \
+		synchronisable.h \
+		base_entity.h \
+		error.h \
+		player.h \
+		track.h \
+		camera.h \
+		ini_parser.h \
+		power_up.h \
+		vector.h \
+		collision.h \
+		keynames.h \
+		proto_class.h \
+		world.h \
+		command_node.h \
+		list.h \
+		shoot_laser.h \
+		world_entity.h \
+		coordinates.h \
+		message_structures.h \
+		shoot_rocket.h \
+		object.h \
+		array.h \
+		material.h \
+		list_template.h \
+		story_entity.h \
+		story_def.h \
+		game_loader.h \
+		campaign.h \
+		curve.h
 
 
Index: orxonox/branches/bezierTrack/src/Makefile.in
===================================================================
--- orxonox/branches/bezierTrack/src/Makefile.in	(revision 3021)
+++ orxonox/branches/bezierTrack/src/Makefile.in	(revision 3023)
@@ -60,5 +60,5 @@
 	campaign.$(OBJEXT) story_entity.$(OBJEXT) object.$(OBJEXT) \
 	environment.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \
-	list.$(OBJEXT) curve.$(OBJEXT)
+	list.$(OBJEXT) curve.$(OBJEXT) coordinates.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -69,5 +69,6 @@
 @AMDEP_TRUE@	./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po ./$(DEPDIR)/curve.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/coordinates.Po ./$(DEPDIR)/curve.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/environment.Po \
@@ -185,6 +186,65 @@
 AM_CXXFLAGS = "-I/usr/X11R6/include"
 AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
-orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc object.cc environment.cc array.cc material.cc list.cc curve.cc
-noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h object.h array.h material.h list_template.h story_entity.h story_def.h game_loader.h campaign.h curve.h
+orxonox_SOURCES = orxonox.cc \
+		world.cc \
+		player.cc \
+		data_tank.cc \
+		world_entity.cc \
+		vector.cc \
+		camera.cc \
+		collision.cc \
+		command_node.cc \
+		ini_parser.cc \
+		keynames.cc \
+		track.cc \
+		base_entity.cc \
+		game_loader.cc \
+		campaign.cc \
+		story_entity.cc \
+		object.cc \
+		environment.cc \
+		array.cc \
+		material.cc \
+		list.cc \
+		curve.cc \
+		coordinates.cc
+
+noinst_HEADERS = ability.h \
+		data_tank.h \
+		npc.h \
+		stdincl.h \
+		ai.h \
+		environment.h \
+		orxonox.h \
+		synchronisable.h \
+		base_entity.h \
+		error.h \
+		player.h \
+		track.h \
+		camera.h \
+		ini_parser.h \
+		power_up.h \
+		vector.h \
+		collision.h \
+		keynames.h \
+		proto_class.h \
+		world.h \
+		command_node.h \
+		list.h \
+		shoot_laser.h \
+		world_entity.h \
+		coordinates.h \
+		message_structures.h \
+		shoot_rocket.h \
+		object.h \
+		array.h \
+		material.h \
+		list_template.h \
+		story_entity.h \
+		story_def.h \
+		game_loader.h \
+		campaign.h \
+		curve.h
+
 all: all-am
 
@@ -259,4 +319,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)/coordinates.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@
Index: orxonox/branches/bezierTrack/src/camera.cc
===================================================================
--- orxonox/branches/bezierTrack/src/camera.cc	(revision 3021)
+++ orxonox/branches/bezierTrack/src/camera.cc	(revision 3023)
@@ -32,8 +32,7 @@
   bound = NULL;
   /* give it some physical live */
-  m = 10;
-  a = new Vector(0.0, 0.0, 0.0);
-  v = new Vector(0.0, 0.0, 0.0);
-  fs = new Vector(0.0, 0.0, 0.0);
+  mass = 10;
+  acceleration = new Vector(0.0, 0.0, 0.0);
+  velocity = new Vector(0.0, 0.0, 0.0);
   cameraMode = NORMAL;
   deltaTime = 3000.0;
@@ -244,8 +243,8 @@
   // ===== 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,
+    gluLookAt(actual_place.pos.x, actual_place.pos.y, actual_place.pos.z, 
+              bound->pos.x, bound->pos.y, bound->pos.z,
               0.0, 0.0, 1.0);
-  */
+  */    
 
   glMatrixMode (GL_MODELVIEW);
Index: orxonox/branches/bezierTrack/src/camera.h
===================================================================
--- orxonox/branches/bezierTrack/src/camera.h	(revision 3021)
+++ orxonox/branches/bezierTrack/src/camera.h	(revision 3023)
@@ -23,5 +23,6 @@
 enum CAMERA_MODE {NORMAL, SMOTH_FOLLOW, STICKY, ELLIPTICAL};
 
-class Camera {
+class Camera : public Coordinate
+{
  private:
   WorldEntity* bound;		//!< the WorldEntity the Camera is bound to
@@ -31,8 +32,7 @@
   
   /* physical system - not needed yet */
-  float m; //!< mass
-  Vector *fs; //!< seil-kraft
-  Vector *a;  //!< acceleration
-  Vector *v;  //!< velocity
+  float mass;            //!< mass
+  Vector *acceleration;  //!< acceleration
+  Vector *velocity;      //!< velocity
   
   /* elliptical camera mode variables */
Index: orxonox/branches/bezierTrack/src/coordinates.cc
===================================================================
--- orxonox/branches/bezierTrack/src/coordinates.cc	(revision 3023)
+++ orxonox/branches/bezierTrack/src/coordinates.cc	(revision 3023)
@@ -0,0 +1,62 @@
+
+#include "coordinates.h"
+
+void Coordinate::setCoord (Coord coord, COORD_TYPE cType)
+{
+  setPosition (coord.position, cType);
+  setRotation (coord.rotation, cType);
+}
+
+void Coordinate::setPosition (Vector position, COORD_TYPE cType)
+{
+  if (cType == WORLD)
+    worldCoord.position = position;
+
+  else if (cType == TRACK)
+    worldCoord.position = position; // set it like (position + world::get_instance->track->getPosition(WORLD));
+
+  else if (cType == LOCAL)
+    worldCoord.position = Vector (0,0,0); // have to think about this one.... if it makes sense at all.
+}
+
+void Coordinate::setRotation (Quaternion rotation, COORD_TYPE cType)
+{
+  if (cType == WORLD)
+    worldCoord.rotation = rotation;
+  else if (cType == TRACK)
+    worldCoord.rotation = rotation; // it like (rotation * world::get_instance->track->getRotation(WORLD));
+  else if (cType == LOCAL)
+    worldCoord.rotation = Quaternion();
+}
+
+Coord Coordinate::getCoord (COORD_TYPE cType) const
+{
+  Coord tmpCoord;
+  tmpCoord.position = getPosition (cType);
+  tmpCoord.rotation = getRotation (cType);
+}
+
+Vector Coordinate::getPosition (COORD_TYPE cType) const
+{
+
+  if (cType == WORLD)
+    return worldCoord.position;
+  else if (cType == TRACK)
+    return worldCoord.position; // should be like (WorldCoord - world::get_instance->track->getPosition(WORLD));
+  else if (cType == LOCAL)
+    return Vector (0,0,0);
+
+}
+
+Quaternion Coordinate::getRotation (COORD_TYPE cType) const
+{
+
+  if (cType == WORLD)
+    return worldCoord.rotation;
+  else if (cType == TRACK)
+    return worldCoord.rotation; // should be like (WorldCoord - world::get_instance->track->getRotation(WORLD));
+  else if (cType == LOCAL)
+    return Quaternion ();
+
+}
+
Index: orxonox/branches/bezierTrack/src/coordinates.h
===================================================================
--- orxonox/branches/bezierTrack/src/coordinates.h	(revision 3021)
+++ orxonox/branches/bezierTrack/src/coordinates.h	(revision 3023)
@@ -34,3 +34,57 @@
 } Placement;
 
+
+///////////////////////////////////////////////////////////////////
+////////  NEW COORDINATES, because the old ones were a bit fuzy  //
+///////////////////////////////////////////////////////////////////
+enum COORD_TYPE {WORLD, TRACK, LOCAL};
+
+typedef struct
+{
+  Vector position;
+  Quaternion rotation;
+} Coord;
+
+class Coordinate
+{
+ private:
+  Coord worldCoord;
+
+ public:
+
+  void setCoord (Coord coordinate, COORD_TYPE cType);
+  void setPosition (Vector position, COORD_TYPE cType);
+  void setRotation (Quaternion rotation, COORD_TYPE cType);
+
+  Coord getCoord (COORD_TYPE cType) const; 
+  Vector getPosition (COORD_TYPE cType) const; 
+  Quaternion getRotation (COORD_TYPE cType) const; 
+};
+
+
+
+
+
+//! World coordinates:
+/**
+   Absolute coordinates in 3D-space are defined as the coordinates, an Entity has in respect to the absolute Zero point
+*/
+typedef struct
+{
+  Vector position;  //!< absolute position of the Object (the one opengl has to know)
+  Quaternion rot;   //!< absolute rotation
+} WorldCoord;
+
+typedef struct
+{
+  Vector position;  //!< The Vector from the current Path-Position to the Entity. (worldCoord->position - track->worldCoord->position)
+  Quaternion rot;   //!< rotation an entity has to the track.
+} TrackCoord;
+
+typedef struct
+{
+  Vector position;  //!< the coordinate to the object itself. This shoud be 0 for an entity. (can be used for explosions on the ship, shoot and so on.)
+  Quaternion rot;   //!< the Rotation of an object itself. (to easily shoot in different directions)
+} LocalCoord;
+
 #endif
Index: orxonox/branches/bezierTrack/src/curve.cc
===================================================================
--- orxonox/branches/bezierTrack/src/curve.cc	(revision 3021)
+++ orxonox/branches/bezierTrack/src/curve.cc	(revision 3023)
@@ -12,6 +12,10 @@
    main-programmer: Benjamin Grauer
    co-programmer: ...
-   
-   Quaternion code borrowed from an Gamasutra article by Nick Bobick and Ken Shoemake
+
+   TODO: 
+     local-Time implementation
+     closed Bezier Curve
+     NURBS
+     
 */
 
Index: orxonox/branches/bezierTrack/src/curve.h
===================================================================
--- orxonox/branches/bezierTrack/src/curve.h	(revision 3021)
+++ orxonox/branches/bezierTrack/src/curve.h	(revision 3023)
@@ -18,4 +18,5 @@
   int nodeCount;
   Vector curvePoint;
+  float localTime; //!< if the time of one point is asked more than once the programm will not calculate it again.
 
   struct PathNode
Index: orxonox/branches/bezierTrack/src/world.cc
===================================================================
--- orxonox/branches/bezierTrack/src/world.cc	(revision 3021)
+++ orxonox/branches/bezierTrack/src/world.cc	(revision 3023)
@@ -104,10 +104,7 @@
 
 	    track->addPoint (Vector(0, 0, 0));
-	    track->addPoint (Vector(10, 0, 0));
-	    track->addPoint (Vector(11, 0, 0));
-	    track->addPoint (Vector(12, 0, 0));
-	    track->addPoint (Vector(13, 0, 0));
-	    track->addPoint (Vector(20, 0, 0));
-	    track->addPoint (Vector(30, 0, 0));
+	    track->addPoint (Vector(10, -5, 0));
+	    track->addPoint (Vector(20, 5, 0));
+	    track->addPoint (Vector(30, -5, 0));
 	    track->addPoint (Vector(40, 0, 0));
 	    track->addPoint (Vector(60, 0, 0));
