Index: /orxonox/branches/chris/src/camera.cc
===================================================================
--- /orxonox/branches/chris/src/camera.cc	(revision 2095)
+++ /orxonox/branches/chris/src/camera.cc	(revision 2096)
@@ -21,4 +21,9 @@
 using namespace std;
 
+/**
+   \brief creates a Camera
+   
+   This standard constructor sets all parameters to zero
+*/
 Camera::Camera ()
 {
@@ -30,8 +35,18 @@
 }
 
+/**
+   \brief default destructor
+*/
 Camera::~Camera ()
 {
 }
 
+/**
+   \brief time based actualisation of camera parameters
+   \param deltaT: The amount of time that has passed in milliseconds
+   
+   This is called by the World in every time_slice, use it to do fancy time dependant effects (such 
+   as smooth camera movement or swaying).
+*/
 void Camera::time_slice (Uint32 deltaT)
 {
@@ -39,4 +54,9 @@
 }
 
+/**
+  \brief this calculates the location where the track wants the camera to be
+   
+	This refreshes the placement the camera should have according to the bound entity's position on the track.
+*/
 void Camera::update_desired_place ()
 {
@@ -56,4 +76,10 @@
 }
 
+/**
+  \brief initialize rendering perspective according to this camera
+   
+	This is called immediately before the a rendering cycle starts, it sets all global rendering options as
+	well as the GL_PROJECTION matrix according to the camera.
+*/
 void Camera::apply ()
 {
@@ -73,4 +99,10 @@
 }
 
+/**
+  \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)
 {
@@ -86,4 +118,12 @@
 }
 
+/**
+  \brief bind the camera to an entity
+  \param entity: The enitity to bind the camera to
+	
+	This sets the focus of the camera to the given entity. This means that it will use the given WorldEntity's
+	Location and get_lookat() to determine the viewpoint the camera will render from.
+	Note that you cannot bind a camera to a free entity.
+*/
 void Camera::bind (WorldEntity* entity)
 {
Index: /orxonox/branches/chris/src/camera.h
===================================================================
--- /orxonox/branches/chris/src/camera.h	(revision 2095)
+++ /orxonox/branches/chris/src/camera.h	(revision 2096)
@@ -1,11 +1,22 @@
+/*! 
+    \file camera.h
+    \brief Viewpoint controlling class definitions
+*/ 
 
 #ifndef CAMERA_H
 #define CAMERA_H
 
+//! Camera
+/**
+ 	This class controls the viewpoint from which the World is rendered. To use the Camera it has
+ 	to be bound to a WorldEntity which serves as the reference focus point. The Camera itself calls
+ 	the WorldEntity::get_lookat() and World::calc_camera_pos() functions to calculate the position it
+ 	currently should be in.
+*/
 class Camera {
  private:
- 	WorldEntity* bound;
- 	Placement actual_place;
- 	Placement desired_place;
+ 	WorldEntity* bound;		//!< the WorldEntity the Camera is bound to
+ 	Placement actual_place;	//!< the Camera's current position
+ 	Placement desired_place; //!< where the Camera should be according to calculations
 
 	void update_desired_place ();
Index: /orxonox/branches/chris/src/command_node.cc
===================================================================
--- /orxonox/branches/chris/src/command_node.cc	(revision 2095)
+++ /orxonox/branches/chris/src/command_node.cc	(revision 2096)
@@ -23,4 +23,5 @@
 
 using namespace std;
+
 
 CommandNode::CommandNode (int ID)
@@ -173,4 +174,6 @@
 	List<WorldEntity>* plist = bound;
 	
+	if( bLocalInput) send_over_network (cmd);
+	
 	while( (plist = plist->get_next()) != NULL)
 	{
@@ -178,2 +181,10 @@
 	}
 }
+
+void CommandNode::set_netID (int ID)
+{
+}
+
+void CommandNode::send_over_network (Command* cmd)
+{
+}
Index: /orxonox/branches/chris/src/command_node.h
===================================================================
--- /orxonox/branches/chris/src/command_node.h	(revision 2095)
+++ /orxonox/branches/chris/src/command_node.h	(revision 2096)
@@ -15,4 +15,9 @@
 #define DEFAULT_KEYBIND_FILE "default.ini"
 
+//! Key aliasing structure
+/**
+	This structure contains the key aliasing information, e.g. the command strings that
+	have been bound to the keys.
+*/
 typedef struct
 {
@@ -21,10 +26,18 @@
 } KeyBindings;
 
+//! Command Node
+/**
+	This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is
+	captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()).
+	Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created
+	with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass
+	them on to his WorldEntities.
+*/
 class CommandNode {
  private:
- 	bool bLocalInput;
- 	int netID;
+ 	bool bLocalInput;	//!< Identifies the CommandNode that processes local input
+ 	int netID;	//!< Unique identifier that is used to determine between remote CommandNodes
 	KeyBindings* aliases;
-	List<WorldEntity>* bound;
+	List<WorldEntity>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
 	int coord[2];
 	
@@ -33,5 +46,5 @@
 	void process_local ();
 	void process_network ();
-	void send_over_networ();
+	void send_over_network (Command* cmd);
 	
  public:
@@ -44,4 +57,6 @@
   void unbind (WorldEntity* entity);
   void process ();
+  
+  void set_netID (int ID);
 };
 
Index: /orxonox/branches/chris/src/orxonox.cc
===================================================================
--- /orxonox/branches/chris/src/orxonox.cc	(revision 2095)
+++ /orxonox/branches/chris/src/orxonox.cc	(revision 2096)
@@ -276,4 +276,9 @@
 }
 
+Camera* Orxonox::get_localinput ()
+{
+	return localinput;
+}
+
 Camera* Orxonox::get_world ()
 {
Index: /orxonox/branches/chris/src/orxonox.h
===================================================================
--- /orxonox/branches/chris/src/orxonox.h	(revision 2095)
+++ /orxonox/branches/chris/src/orxonox.h	(revision 2096)
@@ -50,4 +50,5 @@
   int init (int argc, char** argv);
 	
+	CommandNode* get_localinput();
 	Camera* get_camera();
 	World* get_world();
Index: /orxonox/branches/chris/src/player.cc
===================================================================
--- /orxonox/branches/chris/src/player.cc	(revision 2095)
+++ /orxonox/branches/chris/src/player.cc	(revision 2096)
@@ -13,5 +13,5 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer:
+   co-programmer: Christian Meyer
 */
 
@@ -20,8 +20,4 @@
 #include <GL/glut.h>
 
-#include "shoot_laser.h"
-#include "shoot_rocket.h"
-#include "data_tank.h"
-
 #include "player.h"
 
@@ -29,102 +25,87 @@
 
 
-Player::Player() 
-   : WorldEntity() {
-  //cout << "Player::Player" << endl;
-  xCor = yCor = zCor = 0;
-  shootLaser = new ShootLaser;
-  shootRocket = new ShootRocket;
+Player::Player(bool isFree) : WorldEntity(isFree)
+{
 }
 
 Player::~Player () 
 {
-  //delete shootLaser;
 }
 
-
-void Player::setPosition( float x, float y, float z)
+void Player::post_spawn ()
 {
-  xCor = x; yCor = y; zCor = z;
+	travel_speed = 1.0;
+	velocity = Vector();
+	bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
+	bFire = false;
+	acceleration = 10.0;
+	set_collision (new CollisionCluster (1.0, Vector(0,0,0));
 }
 
-
-void Player::getPosition(float* x, float* y, float* z)
+void Player::tick (float time)
 {
-  *x = xCor; *y = yCor; *z = zCor;
+	// movement
+	move (float time);
 }
 
-
-void Player::setCollisionRadius(float radius) 
+void Player::hit (WorldEntity* weapon, Vector loc)
 {
-  collisionRadius = radius;
 }
 
-
-void Player::goX(float x) 
+void Player::destroy ()
 {
-  xCor += x;
 }
 
-
-void Player::goY(float y)
+void Player::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags)
 {
-  yCor += y;
 }
 
-void Player::goZ(float z)
+void Player::command (Command* cmd)
 {
-  zCor += z;
+	if( strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
+	else if( strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
+	else if( strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
+	else if( strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
+	else if( strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
 }
 
-
-
-void Player::shoot(int n) 
+void Player::draw ()
 {
-
-  //  if (shootLaser->inhibitor++ <= 100)
-  shootLaser->addShoot(xCor, yCor, zCor);
-  // else if (shootLaser->inhibitor++ <= 200)
-  shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
-  //  else if (shootLaser->inhibitor++ <= 300)
-  shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
-  //  else
-  shootLaser->inhibitor =0;
-  
-  //  if (shootRocket->inhibitor++ >=80)
-  {
-    shootRocket->addBackParable(xCor, yCor, zCor);
-    shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT);
-    shootRocket->addSideAcc(xCor, yCor, zCor, LEFT);
-    shootRocket->addRotater(xCor, yCor, zCor);
-    //  if (shootRocket->inhibitor >=90)
-    //        shootRocket->inhibitor =0;
-  }
-  //cout << "Player::shoot" << endl;
-  
-  /*
-  shootLaser->addShoot(xCor, yCor, zCor);
-  shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
-  shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
-  //shootRocket->addShoot(xCor, yCor, zCor);
-  //cout << "Player::shoot" << endl;
-  */
 }
 
+void Player::get_lookat (Location* locbuf)
+{
+	*locbuf = *get_location();
+	locbuf->dist += 5.0;
+}
 
-//void Player::addIO(InputOutput *io) {}
+void Player::left_world ()
+{
+}
 
-
-void Player::paint() 
+void Player::move (float time)
 {
-  //cout << "Player::drawPlayer" << endl;
-  glPushMatrix();
-  glTranslatef(xCor, yCor, 3.0);
-  glScalef(1.0, 3.0, 1.0);
-  glutWireCube(1.0);
-  glPopMatrix();
-  /* draw all the shoots additionaly */
-  shootLaser->drawShoot();
-  shootRocket->drawShoot();
-  //cout << "Player::drawPlayer, end" << endl;
+	float xAccel, yAccel, zAccel;
+	xAccel = yAccel = zAccel = 0;
+	if( bUp) xAccel += acceleration;
+	if( bDown) xAccel -= acceleration;
+	if( bLeft) yAccel += acceleration;
+	if( bRight) yAccel -= acceleration;
+	if( bAscend) zAccel += acceleration;
+	if( bDescend) zAccel -= acceleration;
+	
+	Vector accel( xAccel, yAccel, zAccel);
+	
+	Location* l = get_location();
+	
+	// r(t) = r(0) + v(0)*t + 1/2*a*t^2
+	// r = position
+	// v = velocity
+	// a = acceleration
+	
+	l->pos = l->pos + velocity*time + (accel*(0.5*t*t)));
+	l->dist += travel_speed * time;
+	
+	velocity += accel * time;
 }
 
@@ -146,10 +127,2 @@
 
 
-
-
-
-
-
-
-
-
Index: /orxonox/branches/chris/src/player.h
===================================================================
--- /orxonox/branches/chris/src/player.h	(revision 2095)
+++ /orxonox/branches/chris/src/player.h	(revision 2096)
@@ -5,41 +5,33 @@
 #include "world_entity.h"
 
-class ShootLaser;
-class ShootRocket;
-
-
 class Player : public WorldEntity 
 {
+	friend class World;
 
  public:
-  Player ();
+  Player (bool isFree);
   ~Player ();
 
-  /* position of the spacecraft */
-  float xCor;
-  float yCor;
-  float zCor;
+	virtual void post_spawn ();
+  virtual void tick (float time);
+  virtual void hit (WorldEntity* weapon, Vector loc);
+  virtual void destroy ();
+  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
+ 	virtual void command (Command* cmd);
   
-  float collisionRadius;
+  virtual void draw ();
+  virtual void get_lookat (Location* locbuf);
 
-
-  /* this player wanna shoot? so include a ref to ShootLaser */
-  ShootLaser* shootLaser;
-  ShootRocket* shootRocket;
-
-  void setPosition(float x, float y, float z);
-  void getPosition(float* x, float* y, float* z);
-  void setCollisionRadius(float radius);
-  void paint();
-  void goX(float x);
-  void goY(float y);
-  void goZ(float x);
-  void shoot(int n);
-  //  void addIO(InputOutput *io);
-  void drawPlayer(void);
+	virtual void left_world ();
 
  private:
-
-
+ 	bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
+ 	bool bFire;
+ 	Vector velocity;
+ 	float travel_speed;
+ 	float acceleration;
+ 	
+ 	void move (float time);
+ 	
 };
 
Index: /orxonox/branches/chris/src/vector.h
===================================================================
--- /orxonox/branches/chris/src/vector.h	(revision 2095)
+++ /orxonox/branches/chris/src/vector.h	(revision 2096)
@@ -12,10 +12,5 @@
 #define PI 3.14159265359f
 
-//! 3D vector
-/**
-  Class for 3-dimensional vector calculation
-  
-  Supports all common vector operations (dot, cross, lenght and so on)
-*/
+CommandNode::
 class Vector {
 
Index: /orxonox/branches/chris/src/world.cc
===================================================================
--- /orxonox/branches/chris/src/world.cc	(revision 2095)
+++ /orxonox/branches/chris/src/world.cc	(revision 2096)
@@ -223,6 +223,11 @@
 	
 	// create a player
+	Worldentity* myPlayer = spawn<Player>();
 	
 	// bind input
+  Orxonox *orx = Orxonox::getInstance();
+  orx->get_localinput()->bind (myPlayer);
+  
 	// bind camera
-}
+	orx->get_camera()->bind (myPlayer);
+}
Index: /orxonox/branches/chris/src/world.h
===================================================================
--- /orxonox/branches/chris/src/world.h	(revision 2095)
+++ /orxonox/branches/chris/src/world.h	(revision 2096)
@@ -10,4 +10,5 @@
 
 	template<class T> T* spawn<T>(Location* loc, WorldEntity* owner);	// template to be able to spawn any derivation of WorldEntity
+	template<class T> T* spawn<T>(Placement* plc, WorldEntity* owner = NULL)
 
 	void time_slice (Uint32 deltaT);
Index: /orxonox/branches/chris/src/world_entity.cc
===================================================================
--- /orxonox/branches/chris/src/world_entity.cc	(revision 2095)
+++ /orxonox/branches/chris/src/world_entity.cc	(revision 2096)
@@ -45,10 +45,10 @@
 WorldEntity::~WorldEntity () {}
 
-Location* WorldEntity::getLocation ()
+Location* WorldEntity::get_location ()
 {
 	return &loc;
 }
 
-Placement* WorldEntity::getPlacement ()
+Placement* WorldEntity::get_placement ()
 {
 	return &place;
@@ -152,2 +152,3 @@
 	owner = spawnowner;
 }
+
Index: /orxonox/branches/chris/src/world_entity.h
===================================================================
--- /orxonox/branches/chris/src/world_entity.h	(revision 2095)
+++ /orxonox/branches/chris/src/world_entity.h	(revision 2096)
@@ -20,5 +20,5 @@
  	Placement* get_placement ();
  	void set_collision (CollisionCluster* newhull);
- 	
+ 	 	
   //void addAbility(Ability* ability);
   //void removeAbility(Ability* ability);
