Index: orxonox/trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4608)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4609)
@@ -98,5 +98,5 @@
   int const length = 3;
   sVec3D* vertList = new sVec3D[length];
-  sVec3D data[length]  = {{5.0, 0.0, 0.0},{2.0, 0.0, 5.0},{14.0, 0.0, 0.0}};//, {5.0, 0.0, 1.0}, {12.0, 0.0, 8.0}, {3.0, 5.0, 4.9}};
+  sVec3D data[length]  = {{5.0, 0.0, 0.0},{2.0, 0.0, 0.5},{14.0, 0.0, 0.0}};//, {5.0, 0.0, 1.0}, {12.0, 0.0, 8.0}, {3.0, 5.0, 4.9}};
 
   for(int i = 0; i < length; ++i)
Index: orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4608)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4609)
@@ -190,5 +190,5 @@
   Jacobi(C, D, V);                                            /* do the jacobi decomposition */
 
-  printf("we got a result! YES: \n");
+  printf("\nwe got a result! YES: \n");
 
   for(int j = 1; j < 4; ++j)
@@ -207,5 +207,5 @@
   box->axis = axis;
 
-  printf("eigenvector: %f, %f, %f\n", box->axis[0]->x, box->axis[0]->y, box->axis[0]->z);
+  printf("\neigenvector: %f, %f, %f\n", box->axis[0]->x, box->axis[0]->y, box->axis[0]->z);
   printf("eigenvector: %f, %f, %f\n", box->axis[1]->x, box->axis[1]->y, box->axis[1]->z);
   printf("eigenvector: %f, %f, %f\n", box->axis[2]->x, box->axis[2]->y, box->axis[2]->z);
@@ -216,9 +216,7 @@
   float*              halfLength = new float[3];             //!< half length of the axis
   float               tmpLength;                             //!< tmp save point for the length
-
-
-  Plane p0(*box->axis[0], *box->center);
-  Plane p1(*box->axis[1], *box->center);
-  Plane p2(*box->axis[2], *box->center);
+  Plane               p0(*box->axis[0], *box->center);       //!< the axis planes
+  Plane               p1(*box->axis[1], *box->center);
+  Plane               p2(*box->axis[2], *box->center);
 
   halfLength[0] = -1.0f;
@@ -249,5 +247,5 @@
 
 
-  printf("we got length: \n");
+  printf("\nwe got length: \n");
   for(int i = 0; i < 3; ++i)
     printf("length[%i] = %f\n", i, box->halfLength[i]);
@@ -255,19 +253,45 @@
 
 
+
+/**
+  \brief this separates an ob-box in the middle
+  \param box: the box to separate
+
+  this will separate the box into to smaller boxes. the separation is done along the middle of the longest axis
+ */
 void OBBTreeNode::forkBox(OBB* box)
 {
   /* get the longest axis of the box */
-  float aLength = -1.0f;
-  int axisNr = 0;
+  float               aLength = -1.0f;                     //!< the length of the longest axis
+  int                 axisIndex = 0;                       //!< this is the nr of the longest axis
+
   for(int i = 0; i < 3; ++i)
-    {
-      if( aLength < box->axis[i]->len())
-        {
-          aLength = box->axis[i]->len();
-          axisNr = i;
-        }
-    }
+  {
+    if( aLength < box->halfLength[i])
+    {
+      aLength = box->halfLength[i];
+      axisIndex = i;
+    }
+  }
+
+  printf("\nlongest axis is: nr %i with a half-length of: %f\n", axisIndex, aLength);
+
 
   /* get the closest vertex near the center */
+  float               dist = 0.0f;                         //!< the smallest distance to each vertex
+  float               tmpDist;                             //!< temporary distance
+  int                 vertexIndex;
+  Plane               separationPlane(*box->axis[axisIndex], *box->center); //!< the separation plane definition
+
+  for(int i = 0; i < box->numOfVertices; ++i)
+  {
+    tmpDist = fabs(separationPlane.distancePoint(vertices[i]));
+    if( tmpDist > dist)
+      dist = tmpDist;
+  }
+
+
+  printf("\nthe clostest vertex is nr: %i, with a dist of: %f\n", vertexIndex ,dist);
+
 
 }
Index: orxonox/trunk/src/lib/math/vector.h
===================================================================
--- orxonox/trunk/src/lib/math/vector.h	(revision 4608)
+++ orxonox/trunk/src/lib/math/vector.h	(revision 4609)
@@ -31,10 +31,18 @@
   /**  \param v The vector to add \returns the addition between two vectors (this + v) */
   inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); };
+  /**  \param v The vector to add \returns the addition between two vectors (this + v) */
+  inline Vector operator+ (const sVec3D& v) const { return Vector(x + v[0], y + v[1], z + v[2]); };
   /** \param v The vector to add  \returns the addition between two vectors (this += v) */
   inline const Vector& operator+= (const Vector& v) { this->x += v.x; this->y += v.y; this->z += v.z; return *this; };
   /** \param v The vector to substract  \returns the substraction between two vectors (this - v) */
+  inline const Vector& operator+= (const sVec3D& v) { this->x += v[0]; this->y += v[1]; this->z += v[2]; return *this; };
+  /** \param v The vector to substract  \returns the substraction between two vectors (this - v) */
   inline Vector operator- (const Vector& v) const { return Vector(x - v.x, y - v.y, z - v.z); }
+  /** \param v The vector to substract  \returns the substraction between two vectors (this - v) */
+  inline Vector operator- (const sVec3D& v) const { return Vector(x - v[0], y - v[1], z - v[2]); }
   /** \param v The vector to substract  \returns the substraction between two vectors (this -= v) */
   inline const Vector& operator-= (const Vector& v) { this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this; };
+  /** \param v The vector to substract  \returns the substraction between two vectors (this -= v) */
+  inline const Vector& operator-= (const sVec3D& v) { this->x -= v[0]; this->y -= v[1]; this->z -= v[2]; return *this; };
   /** \param v the second vector  \returns The dotProduct between two vector (this (dot) v) */
   inline float operator* (const Vector& v) const { return x * v.x + y * v.y + z * v.z; };
