Index: orxonox/branches/chris/core/collision.cc
===================================================================
--- orxonox/branches/chris/core/collision.cc	(revision 1975)
+++ orxonox/branches/chris/core/collision.cc	(revision 1981)
@@ -22,4 +22,9 @@
 using namespace std;
 
+/**
+   \brief simple CollisionCluster constructor
+   \param rad: the radius of the base sphere
+   \param mid: the middle point of the sphere
+*/
 CollisionCluster::CollisionCluster (float rad = 1.0, Vector mid = Vector(0,0,0))
 {
@@ -31,4 +36,8 @@
 }
 
+/**
+   \brief loads a CollisionCluster from a data file
+   \param filename: self-explanatory
+*/
 CollisionCluster::CollisionCluster (char* filename)
 {
@@ -58,4 +67,7 @@
 }
 
+/**
+   \brief Simple destructor that cleans up all the mess
+*/
 CollisionCluster::~CollisionCluster ()
 {
@@ -63,4 +75,9 @@
 }
 
+/**
+   \brief stores the CollisionCluster into a file
+   \param filename: self-explanatory
+   \return zero on success, -1 on error
+*/
 int CollisionCluster::store (char* filename)
 {
@@ -74,4 +91,13 @@
 }
 
+/**
+   \brief performs a collision check between a CollisionCluster and a Line
+   \param pa: pointer to the Placement of the CollisionCluster
+   \param a: pointer to the CollisionCluster
+   \param ahitflags: pointer to an unsigned long to store hitlocation data
+   \param trace: pointer to the Line
+   \param impactpoint: pointer to a Vector where the point of intersection is stored in
+   \return true on collision, false otherwise. If true is returned, the flag in ahitflags that symbolises the hit subsphere is set, and impactpoint is set to the Location where the intersection occured
+*/
 bool check_trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
 {
@@ -82,4 +108,15 @@
 }
 
+/**
+   \brief performs a collision check between two CollisionClusters
+   \param pa: pointer to the Placement of the first CollisionCluster
+   \param a: pointer to the first CollisionCluster 
+   \param ahitflags: pointer to an unsigned long to store hitlocation data on the first CollisionCluster
+   \param pb: pointer to the Placement of the second CollisionCluster
+   \param b: pointer to the second CollisionCluster
+   \param bhitflags: pointer to an unsigned long to store hitlocation data on the second CollisionCluster
+   \return true on collision, false otherwise
+   If true is returned, all flags in ahitflags and bhitflags that symbolize intersecting subspheres in the respective CollisionCluster are set
+*/
 bool check_collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)
 {
@@ -91,4 +128,12 @@
 }
 
+/**
+   \brief performs an intersection check between two spheres
+   \param m1: center point of first sphere
+   \param r1: radius of first sphere
+   \param m2: center point of second sphere
+   \param r2: radius of second sphere
+   \return true on intersection, false otherwise
+*/
 bool sphere_sphere_collision( Vector m1, float r1, Vector m2, float r2)
 {
@@ -97,4 +142,12 @@
 }
 
+/**
+   \brief performs an intersection check between a Line and a sphere
+   \param m: center point of the sphere
+   \param r: radius of the sphere
+   \param l: pointer to the Line
+   \param impactpoint: pointer to a buffer to store the point of intersection
+   \return true on intersection, false otherwise. If true is returned, impactpoint is set to the loaction where the intersection occured
+*/
 bool trace_sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint)
 {
@@ -124,4 +177,7 @@
 }
 
+/**
+   \brief recursive implementation for collision detection within a CC_Tree
+*/
 bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags)
 {
@@ -163,4 +219,9 @@
 }
 
+/**
+   \brief sets the <ID>th flag in flags
+   \param flags: pointer to the long used for flagging
+   \param ID: number of the flag to be set
+*/
 void setflag( unsigned long* flags, unsigned long ID)
 {
@@ -175,4 +236,7 @@
 }
 
+/**
+   \brief frees the memory allocated in a CC_Tree
+*/
 void free_CC_Tree( CC_Tree* tree)
 {
@@ -185,4 +249,7 @@
 }
 
+/**
+   \brief loads a CC_Tree from a stream
+*/
 CC_Tree* load_CC_Tree (FILE* stream)
 {
@@ -233,4 +300,7 @@
 }
 
+/**
+   \brief saves a CC_Tree to a stream
+*/
 int save_CC_Tree (CC_Tree* tree, FILE* stream)
 {
@@ -263,4 +333,7 @@
 }
 
+/**
+   \brief recursive implementation for traceing detection within a CC_Tree
+*/
 bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
 {
Index: orxonox/branches/chris/core/vector.cc
===================================================================
--- orxonox/branches/chris/core/vector.cc	(revision 1975)
+++ orxonox/branches/chris/core/vector.cc	(revision 1981)
@@ -25,4 +25,5 @@
    \brief add two vectors
    \param v: the other vector
+   \return the sum of both vectors
 */
 Vector Vector::operator+ (const Vector& v) const
@@ -40,4 +41,5 @@
    \brief subtract a vector from another
    \param v: the other vector
+   \return the difference between the vectors
 */
 Vector Vector::operator- (const Vector& v) const
@@ -55,4 +57,5 @@
    \brief calculate the dot product of two vectors
    \param v: the other vector
+   \return the dot product of the vectors
 */
 float Vector::operator* (const Vector& v) const
@@ -63,5 +66,6 @@
 /**
    \brief multiply a vector with a float
-   \param v: the factor
+   \param f: the factor
+   \return the vector multipied by f
 */
 Vector Vector::operator* (float f) const
@@ -78,5 +82,6 @@
 /**
    \brief divide a vector with a float
-   \param v: the factor
+   \param f: the divisor
+   \return the vector divided by f   
 */
 Vector Vector::operator/ (float f) const
@@ -100,4 +105,5 @@
    \brief calculate the dot product of two vectors
    \param v: the other vector
+   \return the dot product of the vectors
 */
 float Vector::dot (const Vector& v) const
@@ -107,6 +113,7 @@
 
 /**
-   \brief calculate the cross product of two vectors
-   \param v: the other vector
+  \brief calculate the cross product of two vectors
+  \param v: the other vector
+	\return the cross product of the vectors
 */
 Vector Vector::cross (const Vector& v) const
@@ -122,5 +129,5 @@
   
 /**
-   \brief normalize the vector to lenght 1.0
+   \brief normalizes the vector to lenght 1.0
 */
 void Vector::normalize ()
@@ -140,5 +147,6 @@
  
 /**
-   \brief calculate the lenght of the vector
+   \brief calculates the lenght of the vector
+   \return the lenght of the vector
 */
 float Vector::len () const
@@ -151,4 +159,5 @@
    \param v1: a vector
    \param v2: another vector
+   \return the angle between the vectors in radians
 */
 float angle_rad (const Vector& v1, const Vector& v2)
@@ -161,4 +170,5 @@
    \param v1: a vector
    \param v2: another vector
+   \return the angle between the vectors in degrees
 */
 float angle_deg (const Vector& v1, const Vector& v2)
@@ -240,5 +250,5 @@
 
 /**
-   \brief creates a nullrotation
+   \brief creates a nullrotation (an identity rotation)
 */
 Rotation::Rotation ()
@@ -259,4 +269,5 @@
    \param v: a vector
    \param r: a rotation
+   \return the rotated vector
 */
 Vector rotate_vector( const Vector& v, const Rotation& r)
@@ -274,4 +285,5 @@
    \brief calculate the distance between two lines
    \param l: the other line
+   \return the distance between the lines
 */
 float Line::distance (const Line& l) const
@@ -288,4 +300,5 @@
    \brief calculate the distance between a line and a point
    \param v: the point
+   \return the distance between the Line and the point
 */
 float Line::distance_point (const Vector& v) const
@@ -299,4 +312,5 @@
    \brief calculate the two points of minimal distance of two lines
    \param l: the other line
+   \return a Vector[2] (!has to be deleted after use!) containing the two points of minimal distance
 */
 Vector* Line::footpoints (const Line& l) const
@@ -311,5 +325,6 @@
 
 /**
-   \brief calculate the length of a line
+  \brief calculate the length of a line
+  \return the lenght of the line 
 */
 float Line::len() const
@@ -331,5 +346,5 @@
 
 /**
-   \brief create a plane from three lines
+   \brief create a plane from three points
    \param a: first point
    \param b: second point
@@ -367,4 +382,5 @@
    \brief returns the distance between the plane and a point
    \param p: a Point
+   \return the distance between the plane and the point (can be negative)
 */
 float Plane::distance_point (const Vector& p) const
@@ -376,6 +392,7 @@
 
 /**
-   \brief returns the side a point is located relative to a plane
+   \brief returns the side a point is located relative to a Plane
    \param p: a Point
+   \return 0 if the point is contained within the Plane, positive(negative) if the point is in the positive(negative) semi-space of the Plane
 */
 float Plane::locate_point (const Vector& p) const
