Index: /orxonox/branches/chris/src/command_node.cc
===================================================================
--- /orxonox/branches/chris/src/command_node.cc	(revision 2140)
+++ /orxonox/branches/chris/src/command_node.cc	(revision 2141)
@@ -26,5 +26,8 @@
 using namespace std;
 
-
+/**
+	\brief constructs a CommandNode to handle remote input
+	\param ID: unique denumerator to identify the node in the network
+*/
 CommandNode::CommandNode (int ID)
 {
@@ -35,4 +38,8 @@
 }
 
+/**
+	\brief constructs a CommandNode to handle local input
+	\param filename: The path and name of the file to load the key bindings from
+*/
 CommandNode::CommandNode (char* filename = DEFAULT_KEYBIND_FILE)
 {
@@ -43,4 +50,7 @@
 }
 
+/**
+	\brief removes the CommandNode from memory
+*/
 CommandNode::~CommandNode ()
 {
@@ -49,4 +59,8 @@
 }
 
+/**
+	\brief loads new key bindings from a file
+	\param filename: The path and name of the file to load the bindings from
+*/
 void CommandNode::load_bindings (char* filename)
 {
@@ -101,4 +115,8 @@
 }
 
+/**
+	\brief binds a WorldEntity to the CommandNode
+	\param entity: Pointer to the entity to bind
+*/
 void CommandNode::bind (WorldEntity* entity)
 {
@@ -106,4 +124,8 @@
 }
 
+/**
+	\brief removes an entity from the list of the CommandNode
+	\param entity: Pointer to the entity to relese
+*/
 void CommandNode::unbind (WorldEntity* entity)
 {
@@ -129,7 +151,9 @@
 }
 
+/**
+	\brief tells the CommandNode to run through all pending events and relay them accordingly
+*/
 void CommandNode::process ()
 {
-perror("CommandNode|process()");
 	if( bLocalInput) process_local ();
 	else process_network ();
@@ -208,6 +232,11 @@
 }
 
+/**
+	\brief sets the network identifier of the CommandNode
+	\param ID: the new ID to use
+*/
 void CommandNode::set_netID (int ID)
 {
+	netID = ID;
 }
 
Index: /orxonox/branches/chris/src/command_node.h
===================================================================
--- /orxonox/branches/chris/src/command_node.h	(revision 2140)
+++ /orxonox/branches/chris/src/command_node.h	(revision 2141)
@@ -34,5 +34,5 @@
 	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.
+	them on to it's WorldEntities.
 */
 class CommandNode {
Index: /orxonox/branches/chris/src/ini_parser.cc
===================================================================
--- /orxonox/branches/chris/src/ini_parser.cc	(revision 2140)
+++ /orxonox/branches/chris/src/ini_parser.cc	(revision 2141)
@@ -19,4 +19,8 @@
 using namespace std;
 
+/**
+	\brief constructs an IniParser using a file
+	\param filename: the path and name of the file to parse
+*/
 IniParser::IniParser (char* filename)
 {
@@ -26,4 +30,7 @@
 }
 
+/**
+	\brief removes the IniParser from memory
+*/
 IniParser::~IniParser ()
 {
@@ -31,4 +38,9 @@
 }
 
+/**
+	\brief opens another file to parse
+	\param filename: path and name of the new file to parse
+	\return zero on success or -1 if an error occured;
+*/
 int IniParser::open_file( char* filename)
 {
@@ -44,4 +56,9 @@
 }
 
+/**
+	\brief set the parsing cursor to the specified section
+	\param section: the name of the section to set the cursor to
+	\return zero on success or -1 if the section could not be found
+*/
 int IniParser::get_section( char* section)
 {
@@ -77,4 +94,10 @@
 }
 
+/**
+	\brief gets the next VarName=VarValue pair from the parsing stream
+	\param name: a pointer to a buffer to store the name of the entry
+	\param value: a pointer to a buffer to store the value of the entry
+	\return zero if the buffers have been filled with data or -1 if there are no entries left in the current section
+*/
 int IniParser::next_var( char* name, char* value)
 {
@@ -111,4 +134,14 @@
 }
 
+/**
+	\brief directly acesses an entry in a section
+	\param name: the name of the entry to find
+	\param section: the section where the entry is to be found
+	\param defvalue: what should be returned in case the entry cannot be found
+	\return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
+
+	The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
+	lead to unwanted behaviour.
+*/
 char* IniParser::get_var( char* name, char* section, char* defvalue = "")
 {
Index: /orxonox/branches/chris/src/ini_parser.h
===================================================================
--- /orxonox/branches/chris/src/ini_parser.h	(revision 2140)
+++ /orxonox/branches/chris/src/ini_parser.h	(revision 2141)
@@ -15,4 +15,8 @@
 #define PARSELINELENGHT 512
 
+//! ini-file parser
+/**
+	This class can be used to load an initializer file and parse it's contents for variablename=value pairs.
+*/
 class IniParser {
  private:
Index: /orxonox/branches/chris/src/keynames.h
===================================================================
--- /orxonox/branches/chris/src/keynames.h	(revision 2140)
+++ /orxonox/branches/chris/src/keynames.h	(revision 2141)
@@ -12,7 +12,30 @@
 #include <SDL/SDL.h>
 
+/**
+	\brief converts a button name string to a integer representing the corresponding SDL mouse button identifier
+	\param name: the name of the mouse button
+	\return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
+*/
 int buttonname_to_SDLB( char* name);
+
+/**
+	\brief converst a SDL mouse button identifier to a name string
+	\param button: an SDL mouse button identifier
+	\return a pointer to a string containing the name of the mouse button
+*/
 char* SDLB_to_buttonname( int button);
+
+/**
+	\brief converts a key name string to a integer representing the corresponding SDLK sym
+	\param name: the name of the key
+	\return the SDLK sym of the named key or -1 if the key name is not valid
+*/
 int keyname_to_SDLK( char* name);
+
+/**
+	\brief converts an SDLK sym to a name string
+	\param key: the SDLK sym
+	\return a pointer to a string containig the name of the key
+*/
 char* SDLK_to_keyname( int key);
 
Index: /orxonox/branches/chris/src/message_structures.h
===================================================================
--- /orxonox/branches/chris/src/message_structures.h	(revision 2140)
+++ /orxonox/branches/chris/src/message_structures.h	(revision 2141)
@@ -1,2 +1,6 @@
+/*!
+	\file message_structures.h
+	\brief contains defintitons of messages that can be passed between classes
+*/
 
 #ifndef _MESSAGESTRUCTURES_H
@@ -5,11 +9,19 @@
 #define CMD_LENGHT 16
 
-	// structure that contains commands
+//! structure that contains a command message
 typedef struct
 {
-	char cmd[CMD_LENGHT];
-	bool bUp;
+	char cmd[CMD_LENGHT];	//!< the command delivered
+	bool bUp;	//!< false = command was activated / true = command was deactivated
+	
+	//! if cmd is "cursor" the coordinates of the mouse cursor are stored here
+	//!@{
 	Uint16 x, y;
-	Sint16 xrel, yrel;
+	//!@}
+	
+	//! if cmd is "cursor" the relative motion of the mouse cursor is stored here
+	//!@{
+	Sint16 xrel, yrel; 
+	//!@}
 } Command;
 
Index: /orxonox/branches/chris/src/orxonox.cc
===================================================================
--- /orxonox/branches/chris/src/orxonox.cc	(revision 2140)
+++ /orxonox/branches/chris/src/orxonox.cc	(revision 2141)
@@ -32,4 +32,7 @@
 using namespace std;
 
+/**
+	\brief create a new Orxonox
+*/
 Orxonox::Orxonox () 
 {
@@ -37,6 +40,7 @@
 }
 
-
-
+/**
+	\brief remove Orxonox from memory
+*/
 Orxonox::~Orxonox () 
 {
@@ -59,4 +63,11 @@
 }
 
+/**
+	\brief this finds the config file
+	
+	Since the config file varies from user to user and since one may want to specify different config files
+	for certain occasions or platforms this function finds the right config file for every occasion and stores
+	it's path and name into configfilename
+*/
 void Orxonox::get_config_file (int argc, char** argv)
 {
@@ -75,4 +86,7 @@
 }
 
+/**
+	\brief initialize Orxonox with command line
+*/
 int Orxonox::init (int argc, char** argv)
 {
@@ -107,4 +121,7 @@
 }
 
+/**
+	\brief initializes SDL and OpenGL
+*/
 int Orxonox::init_video () 
 {
@@ -148,4 +165,7 @@
 }
 
+/**
+	\brief initializes the sound engine
+*/
 int Orxonox::init_sound () 
 {
@@ -154,4 +174,7 @@
 }
 
+/**
+	\brief initializes input functions
+*/
 int Orxonox::init_input () 
 {
@@ -162,5 +185,7 @@
 }
 
-
+/**
+	\brief initializes network system
+*/
 int Orxonox::init_networking () 
 {
@@ -169,4 +194,7 @@
 }
 
+/**
+	\brief initializes and loads resource files
+*/
 int Orxonox::init_resources () 
 {
@@ -175,4 +203,7 @@
 }
 
+/**
+	\brief initializes the world
+*/
 int Orxonox::init_world () 
 {
@@ -185,8 +216,15 @@
 }
 
+/**
+	\brief exits Orxonox
+*/
 void Orxonox::quitGame() 
 {
 	bQuitOrxonox = true;
 }
+
+/**
+	\brief this runs all of Orxonox
+*/
 void Orxonox::mainLoop()
 {
@@ -211,4 +249,8 @@
 }
 
+/**
+	\brief handles sprecial events from localinput
+	\param event: an event not handled by the CommandNode 
+*/
 void Orxonox::event_handler (SDL_Event* event)
 {
@@ -216,4 +258,7 @@
 }
 
+/**
+	\brief synchronize local data with remote data
+*/
 void Orxonox::synchronize ()
 {
@@ -222,4 +267,7 @@
 }
 
+/**
+	\brief run all input processing
+*/
 void Orxonox::handle_input ()
 {
@@ -229,4 +277,7 @@
 }
 
+/**
+	\brief advance the timeline
+*/
 void Orxonox::time_slice ()
 {
@@ -241,4 +292,7 @@
 }
 
+/**
+	\brief compute collision detection
+*/
 void Orxonox::collision ()
 {
@@ -246,9 +300,14 @@
 }
 
+/**
+	\brief handle keyboard commands that are not meant for WorldEntities
+	\param cmd: the command to handle
+	\return true if the command was handled by the system or false if it may be passed to the WorldEntities
+*/
 bool Orxonox::system_command (Command* cmd)
 {
-	if( !strcmp( cmd->cmd, "quit") && !cmd->bUp)
+	if( !strcmp( cmd->cmd, "quit"))
 	{
-		bQuitOrxonox = true;
+		if( !cmd->bUp) bQuitOrxonox = true;
 		return true;
 	}
@@ -256,4 +315,7 @@
 }
 
+/**
+	\brief render the current frame
+*/
 void Orxonox::display ()
 {
@@ -269,4 +331,8 @@
 }
 
+/**
+	\brief retrieve a pointer to the local Camera
+	\return a pointer to localcamera
+*/
 Camera* Orxonox::get_camera ()
 {
@@ -274,4 +340,8 @@
 }
 
+/**
+	\brief retrieve a pointer to the local CommandNode
+	\return a pointer to localinput
+*/
 CommandNode* Orxonox::get_localinput ()
 {
@@ -279,4 +349,8 @@
 }
 
+/**
+	\brief retrieve a pointer to the local World
+	\return a pointer to world
+*/
 World* Orxonox::get_world ()
 {
@@ -296,4 +370,6 @@
 	
   (*orx).mainLoop();
+
+  delete orx;
   
   return 0;
Index: /orxonox/branches/chris/src/orxonox.h
===================================================================
--- /orxonox/branches/chris/src/orxonox.h	(revision 2140)
+++ /orxonox/branches/chris/src/orxonox.h	(revision 2141)
@@ -1,2 +1,6 @@
+/*! 
+    \file orxonox.h
+    \brief Orxonox core functions
+*/ 
 
 #ifndef ORXONOX_H
@@ -13,4 +17,7 @@
 class Camera;
 
+//! Orxonox core singleton class
+/**
+*/
 class Orxonox {
 
Index: /orxonox/branches/chris/src/player.h
===================================================================
--- /orxonox/branches/chris/src/player.h	(revision 2140)
+++ /orxonox/branches/chris/src/player.h	(revision 2141)
@@ -1,2 +1,6 @@
+/*! 
+    \file player.h
+    \brief Implements a basic controllable WorldEntity
+*/
 
 #ifndef PLAYER_H
@@ -5,4 +9,5 @@
 #include "world_entity.h"
 
+//! Basic controllable WorldEntity
 class Player : public WorldEntity 
 {
Index: /orxonox/branches/chris/src/track.cc
===================================================================
--- /orxonox/branches/chris/src/track.cc	(revision 2140)
+++ /orxonox/branches/chris/src/track.cc	(revision 2141)
@@ -20,4 +20,7 @@
 using namespace std;
 
+/**
+	\brief creates a null Track part
+*/
 Track::Track ()
 {
@@ -28,4 +31,11 @@
 }
 
+/**
+	\brief creates a functional base Track part
+	\param number: the ID if this Track part
+	\param next: the ID of the next Track part
+	\param start: pointer to an anchor point (Vector) representing the offset of this part
+	\param finish: pointer to an anchor point (Vector) representing the end of this part
+*/
 Track::Track (Uint32 number, Uint32 next, Vector* start, Vector* finish)
 {
@@ -36,11 +46,21 @@
 }
 
+/**
+	\brief removes the Track part from memory
+*/
 Track::~Track ()
 {
 }
 
+/**
+	\brief calculate a camera Placement from a "look at"-Location
+	\param lookat: the Location the camera should be centered on
+	\param camplc: pointer to a buffer where the new camera Placement should be put into
+	
+	Theoretically you can place the camera wherever you want, but for the sake of common sense I suggest that you at least
+	try to keep the thing that should be looked at inside camera boundaries.
+*/
 void Track::map_camera (Location* lookat, Placement* camplc)
 {
-printf("Track|Mapping camera: %d (%f)\n", lookat->part, lookat->dist);
 	Line trace(*offset, *end - *offset);
 	float l = trace.len ();
@@ -48,13 +68,21 @@
 //	camplc->r = *offset + Vector(0,0,0.5);
 //	camplc->w = Quaternion (trace.a, Vector(0,0,1));
-	
+	float r = (lookat->dist)*PI / l;
 	camplc->r = trace.r + (trace.a * ((lookat->dist-10.0) / l)) + Vector(0,0,5.0);
-	camplc->w = Quaternion(Vector(0,0,0) - ((trace.r + (trace.a * ((lookat->dist) / l)) - camplc->r)), Vector(0,0,1));
+	camplc->w = Quaternion(Vector(0,0,0) - ((trace.r + (trace.a * ((lookat->dist) / l)) - camplc->r)), Vector(0,sin(r),cos(r)));
 	
 }
 
+/**
+	\brief calculate a Placement from a given Location
+	\param loc: the Location the entity is in
+	\param plc: a pointer to a buffer where the corresponding Placement should be put into
+	
+	There are no limitations to how you transform a Location into a Placement, but for the sake of placement compatibility between
+	track parts you should make sure that the resulting Placement at dist == 0 is equal to the offset Vector and the Placement at
+	dist == len() is equal to the end Vector. Elseway there will be ugly artifacts when transfering between track parts.
+*/
 bool Track::map_coords (Location* loc, Placement* plc)
 {
-printf("Track|Mapping coords: %d (%f)\n", loc->part, loc->dist);
 	Line trace(*offset, *end - *offset);
 	float l = trace.len ();
@@ -75,12 +103,30 @@
 }
 
+/**
+	\brief this is called when a WorldEntity enters a Track part
+	\param entity: pointer to the WorldEntity in question
+	
+	You can do stuff like add or remove effects, do some coordinate finetuning or whatever in here.
+*/
 void Track::post_enter (WorldEntity* entity)
 {
 }
 
+/**
+	\brief this is called when a WorldEntity leaves a Track part
+	\param entity: pointer to the WorldEntity in question
+	
+	You can do stuff like add or remove effects, do some coordinate finetuning or whatever in here.
+*/
 void Track::post_leave (WorldEntity* entity)
 {
 }
 
+/**
+	\brief this is called every frame
+	\param deltaT: amount of time passed since the last frame in seconds
+	
+	Do time based or polling scripts here. 
+*/
 void Track::tick (float deltaT)
 {
Index: /orxonox/branches/chris/src/track.h
===================================================================
--- /orxonox/branches/chris/src/track.h	(revision 2140)
+++ /orxonox/branches/chris/src/track.h	(revision 2141)
@@ -1,2 +1,6 @@
+/*! 
+    \file track.h
+    \brief Basic level architecture
+*/ 
 
 #ifndef TRACK_H
@@ -5,4 +9,9 @@
 #include "stdincl.h"
 
+//!	The Red Line through a level
+/**
+	Handles level boundaries, bound movement mapping, camera placement and scripting.
+	To create special levels with special camera movement, rules or whatever, derive from this base class.
+*/
 class Track 
 {
Index: /orxonox/branches/chris/src/vector.cc
===================================================================
--- /orxonox/branches/chris/src/vector.cc	(revision 2140)
+++ /orxonox/branches/chris/src/vector.cc	(revision 2141)
@@ -181,4 +181,7 @@
 }
 
+/**
+	\brief creates a multiplicational identity Quaternion
+*/
 Quaternion::Quaternion ()
 {
@@ -187,4 +190,9 @@
 }
 
+/**
+	\brief turns a rotation along an axis into a Quaternion
+	\param angle: the amount of radians to rotate
+	\param axis: the axis to rotate around
+*/
 Quaternion::Quaternion (float angle, const Vector& axis)
 {
@@ -193,4 +201,14 @@
 }
 
+/**
+	\brief calculates a look_at rotation
+	\param dir: the direction you want to look
+	\param up: specify what direction up should be
+	
+	Mathematically this determines the rotation a (0,0,1)-Vector has to undergo to point the same way as dir.
+	If you want to use this with cameras, you'll have to reverse the dir Vector (Vector(0,0,0) - your viewing direction)
+	or you'll point the wrong way. You can use this for meshes as well (then you do not have to reverse the vector), but keep in mind that if you do that, the model's front
+	has to point in +z direction, and left and right should be -x or +x respectively or the mesh wont rotate correctly.
+*/
 Quaternion::Quaternion (const Vector& dir, const Vector& up)
 {
@@ -222,4 +240,13 @@
 }
 
+/**
+	\brief calculates a rotation from euler angles
+	\param roll: the roll in radians
+	\param pitch: the pitch in radians
+	\param yaw: the yaw in radians
+	
+	I DO HONESTLY NOT EXACTLY KNOW WHICH ANGLE REPRESENTS WHICH ROTATION. And I do not know in what order they are applied,
+	I just copy-pasted the code.
+*/
 Quaternion::Quaternion (float roll, float pitch, float yaw)
 {
@@ -244,4 +271,9 @@
 }
 
+/**
+	\brief rotates one Quaternion by another
+	\param q: another Quaternion to rotate this by
+	\return a quaternion that represents the first one rotated by the second one (WARUNING: this operation is not commutative! e.g. (A*B) != (B*A))
+*/
 Quaternion Quaternion::operator*(const Quaternion& q) const
 {
@@ -266,4 +298,9 @@
 }
 
+/**
+	\brief add two Quaternions
+	\param q: another Quaternion
+	\return the sum of both Quaternions
+*/
 Quaternion Quaternion::operator+(const Quaternion& q) const
 {
@@ -274,4 +311,9 @@
 }
 
+/**
+	\brief subtract two Quaternions
+	\param q: another Quaternion
+	\return the difference of both Quaternions
+*/
 Quaternion Quaternion::operator- (const Quaternion& q) const
 {
@@ -282,4 +324,9 @@
 }
 
+/**
+	\brief rotate a Vector by a Quaternion
+	\param v: the Vector
+	\return a new Vector representing v rotated by the Quaternion
+*/
 Vector Quaternion::apply (Vector& v) const
 {
@@ -291,4 +338,9 @@
 }
 
+/**
+	\brief multiply a Quaternion with a real value
+	\param f: a real value
+	\return a new Quaternion containing the product
+*/
 Quaternion Quaternion::operator*(const float& f) const
 {
@@ -299,4 +351,9 @@
 }
 
+/**
+	\brief divide a Quaternion by a real value
+	\param f: a real value
+	\return a new Quaternion containing the quotient
+*/
 Quaternion Quaternion::operator/(const float& f) const
 {
@@ -308,4 +365,8 @@
 }
 
+/**
+	\brief calculate the conjugate value of the Quaternion
+	\return the conjugate Quaternion
+*/
 Quaternion Quaternion::conjugate() const
 {
@@ -315,4 +376,8 @@
 }
 
+/**
+	\brief calculate the norm of the Quaternion
+	\return the norm of The Quaternion
+*/
 float Quaternion::norm() const
 {
@@ -320,4 +385,10 @@
 }
 
+/**
+	\brief calculate the inverse value of the Quaternion
+	\return the inverse Quaternion
+	
+	Note that this is equal to conjugate() if the Quaternion's norm is 1
+*/
 Quaternion Quaternion::inverse() const
 {
@@ -330,4 +401,8 @@
 }
 
+/**
+	\brief convert the Quaternion to a 4x4 rotational glMatrix
+	\param m: a buffer to store the Matrix in
+*/
 void Quaternion::matrix (float m[4][4]) const
 {
@@ -355,4 +430,8 @@
 }
 
+/**
+	\brief convert a rotational 4x4 glMatrix into a Quaternion
+	\param m: a 4x4 matrix in glMatrix order
+*/
 Quaternion::Quaternion (float m[4][4])
 {
Index: /orxonox/branches/chris/src/vector.h
===================================================================
--- /orxonox/branches/chris/src/vector.h	(revision 2140)
+++ /orxonox/branches/chris/src/vector.h	(revision 2141)
@@ -12,4 +12,8 @@
 #define PI 3.14159265359f
 
+//! 3D Vector
+/**
+	Class to handle 3D Vectors
+*/
 class Vector {
 
@@ -43,6 +47,6 @@
 {
  public:
-	Vector v;
-	float w;
+	Vector v;	//!< Imaginary Vector
+	float w; //!< Real part of the number
 
  	Quaternion ();
Index: /orxonox/branches/chris/src/world.cc
===================================================================
--- /orxonox/branches/chris/src/world.cc	(revision 2140)
+++ /orxonox/branches/chris/src/world.cc	(revision 2141)
@@ -27,5 +27,5 @@
 
 /** 
-   \brief Create a new World
+   \brief create a new World
    
    This creates a new empty world!
@@ -36,5 +36,7 @@
 }
 
-
+/** 
+   \brief remove the World from memory
+*/
 World::~World ()
 {
@@ -43,4 +45,10 @@
 }
 
+/** 
+   \brief checks for collisions
+   
+   This method runs through all WorldEntities known to the world and checks for collisions between them.
+   In case of collisions the collide() method of the corresponding entities is called.
+*/
 void World::collide ()
 {
@@ -75,4 +83,7 @@
 }
 
+/** 
+   \brief runs through all entities calling their draw() methods
+*/
 void World::draw ()
 {
@@ -140,4 +151,10 @@
 }
 
+/** 
+   \brief updates Placements and notifies entities when they left the world
+   
+   This runs trough all WorldEntities and maps Locations to Placements if they are bound, checks
+   whether they left the level boundaries and calls appropriate functions.
+*/
 void World::update ()
 {
@@ -190,4 +207,8 @@
 }
 
+/** 
+  \brief relays the passed time since the last frame to entities and Track parts
+	\param deltaT: the time passed since the last frame in milliseconds
+*/
 void World::time_slice (Uint32 deltaT)
 {
@@ -209,4 +230,7 @@
 }
 
+/**
+	\brief removes level data from memory
+*/
 void World::unload()
 {
@@ -215,4 +239,7 @@
 }
 
+/**
+	\brief loads a simple level for testing purposes
+*/
 void World::load_debug_level()
 {
@@ -245,4 +272,7 @@
 }
 
+/**
+	\brief calls the correct mapping function to convert a given "look at"-Location to a Camera Placement
+*/
 void World::calc_camera_pos (Location* loc, Placement* plc)
 {
Index: /orxonox/branches/chris/src/world.h
===================================================================
--- /orxonox/branches/chris/src/world.h	(revision 2140)
+++ /orxonox/branches/chris/src/world.h	(revision 2141)
@@ -1,2 +1,6 @@
+/*! 
+    \file world.h
+    \brief Holds and manages all game data
+*/ 
 
 #ifndef WORLD_H
@@ -8,4 +12,5 @@
 class WorldEntity;
 
+//! The game environment
 class World {
 
@@ -40,4 +45,15 @@
 };
 
+/**
+    \brief spawn a new WorldEntity at a Location
+    \param loc: the Location where the Entity should be spawned
+    \param owner: a pointer to the parent of the Entity
+    \return a pointer to the new WorldEntity or NULL if there was an error
+    
+    You can use this function to spawn any derivation of WorldEntity you want, just specify the desired
+    class within the template specification brackets. Do not attempt to spawn any classes that have NOT been
+    derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()
+    works with both free and bound WorldEntities.
+*/ 
 template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL)
 {
@@ -62,4 +78,16 @@
 }
 
+/**
+    \brief spawn a new WorldEntity at a Placement
+    \param lplc: the placement where the Entity should be spawned
+    \param owner: a pointer to the parent of the Entity
+    \return a pointer to the new WorldEntity or NULL if there was an error
+    
+    You can use this function to spawn any FREE derivation of WorldEntity you want, just specify the desired
+    class within the template specification brackets. Do not attempt to spawn any classes that have NOT been
+    derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()
+    works with free WorldEntities only, you will provoke an error message if you try to spawn a bound Entity with 
+    a Placement.
+*/ 
 template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL)
 {
Index: /orxonox/branches/chris/src/world_entity.cc
===================================================================
--- /orxonox/branches/chris/src/world_entity.cc	(revision 2140)
+++ /orxonox/branches/chris/src/world_entity.cc	(revision 2141)
@@ -24,16 +24,13 @@
 using namespace std;
 
-
 /**
-   \brief 
-   \param v:
-   \return 
-*/
-
-/**
-   \brief Constructor
-
-   This Constructor initializises the all WorldEntities. Everything, that is a part of the game-world is a child of WorldEntity. This class implements empty functions for all sort of operation a WorldEntity has to or can implement.
-This is some sort of standard interface to all WorldEntities...
+   \brief standard constructor
+   
+   Every derived contructor HAS to call the previous one supplying the isFree parameter. This is necessary to distunguish
+   between free and bound entities. The difference between them is simply the fact that the movement of a free entity is
+   not bound to the track of a world. Use this to implement projectile or effect classes that do not have to travel along the track.
+   To specify an entity to be free or bound set the default parameter in the declaration of the constructor.
+   Theoretically you should never have to call the constructor of an Entity directly, for it is called by the spawn() function of the World
+   class. So if you want to create a new entity at any time, call World::spawn(). It will handle everything that is necessary.
 */
 WorldEntity::WorldEntity (bool isFree) : bFree(isFree)
@@ -43,6 +40,16 @@
 }
 
-WorldEntity::~WorldEntity () {}
+/**
+	\brief standard destructor
+*/
+WorldEntity::~WorldEntity ()
+{
+	if( collisioncluster != NULL) delete collisioncluster;
+}
 
+/**
+	\brief get the Location of the WorldEntity
+	\return a pointer to location
+*/
 Location* WorldEntity::get_location ()
 {
@@ -50,4 +57,8 @@
 }
 
+/**
+	\brief get the Placement of the WorldEntity
+	\return a pointer to placement
+*/
 Placement* WorldEntity::get_placement ()
 {
@@ -55,4 +66,8 @@
 }
 
+/**
+	\brief query whether the WorldEntity in question is free
+	\return true if the WorldEntity is free or false if it isn't
+*/
 bool WorldEntity::isFree ()
 {
@@ -60,4 +75,10 @@
 }
 
+/**
+	\brief set the WorldEntity's collision hull
+	\param newhull: a pointer to a completely assembled CollisionCluster
+	
+	Any previously assigned collision hull will be deleted on reassignment
+*/
 void WorldEntity::set_collision (CollisionCluster* newhull)
 {
@@ -68,14 +89,15 @@
 
 /**
-   \brief this method is called every tick
-   \param time: the time since start of the world
-
-   This function is called before every repaint of the world, to update every time dependent variable of the entity. If the entity moves, it has to calculate the new position every tick here in this function. Do not use this for animations.
+	\brief this method is called every frame
+	\param time: the time in seconds that has passed since the last tick
+	
+	Handle all stuff that should update with time inside this method (movement, animation, etc.)
 */
 void WorldEntity::tick(float time) 
-{}
+{
+}
 
 /**
-   \brief the entity is painted to the screen with this function
+   \brief the entity is drawn onto the screen with this function
 
    This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
@@ -83,12 +105,13 @@
 void WorldEntity::draw() 
 {
-printf("WorldEntity|draw()\n");
 }
 
-/* virtual void WorldEntity::actionEvent(Event* event); */
 /**
-   \brief this function is called, when two entities collide
-   \param we: the world entity, with whom it collides
-   \param loc: place where the collision happens
+	\brief this function is called, when two entities collide
+	\param other: the world entity with whom it collides
+	\param ownhitflags: flags to the CollisionCluster subsections that registered an impact
+	\param otherhitflags: flags to the CollisionCluster subsections of the other entity that registered an impact
+
+	Implement behaviour like damage application or other miscellaneous collision stuff in this function
 */
 void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {}
@@ -104,5 +127,5 @@
 
 /**
-   \brief this function is called, if the entity is to be destroied
+   \brief this function is called when the entity is to be destroied
    
    This can be called, if eg. something realy bad happens :)
@@ -110,4 +133,8 @@
 void WorldEntity::destroy() {}
 
+
+/**
+	\brief basic initialisation for bound Entities
+*/
 void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner)
 {
@@ -116,4 +143,7 @@
 }
 
+/**
+	\brief basic initialisation for free Entities
+*/
 void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner)
 {
@@ -122,16 +152,42 @@
 }
 
+/**
+	\brief this is called immediately after the Entity has been constructed and initialized
+	
+	Put any initialisation code that requires knowledge of location (placement if the Entity is free) and owner of the entity here.
+	DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted.
+*/
 void WorldEntity::post_spawn ()
 {
 }
 
+/**
+	\brief this handles incoming command messages
+	\param cmd: a pointer to the incoming Command structure
+	
+	Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used
+	to send commands from one WorldEntity to another.
+*/
 void WorldEntity::command (Command* cmd)
 {
 }
 
+/**
+	\brief this is called by the local Camera to determine the point it should look at on the WorldEntity
+	\param locbuf: a pointer to the buffer to fill with a location to look at
+	
+	You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how
+	to look at the location you return with this.
+*/
 void WorldEntity::get_lookat (Location* locbuf)
 {
 }
 
+/**
+	\brief this method is called by the world if the WorldEntity leaves valid gamespace
+	
+	For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
+	place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
+*/
 void WorldEntity::left_world ()
 {
Index: /orxonox/branches/chris/src/world_entity.h
===================================================================
--- /orxonox/branches/chris/src/world_entity.h	(revision 2140)
+++ /orxonox/branches/chris/src/world_entity.h	(revision 2141)
@@ -1,2 +1,6 @@
+/*! 
+    \file world_entity.h
+    \brief Definition of the basic WorldEntity
+*/
 
 #ifndef WORLD_ENTITY_H
@@ -7,4 +11,5 @@
 class CollisionCluster;
 
+//! Basic class from which all interactive stuff in the world is derived from
 class WorldEntity
 {	
