Index: branches/collision_detection/src/defs/debug.h
===================================================================
--- branches/collision_detection/src/defs/debug.h	(revision 5870)
+++ branches/collision_detection/src/defs/debug.h	(revision 5882)
@@ -75,5 +75,5 @@
   #define DEBUG_MODULE_OBJECT_MANAGER        2
   #define DEBUG_MODULE_ANIM                  2
-  #define DEBUG_MODULE_COLLISON_DETECTION    4
+  #define DEBUG_MODULE_COLLISION_DETECTION   4
   #define DEBUG_MODULE_SPATIAL_SEPARATION    2
   #define DEBUG_MODULE_GUI                   2
Index: branches/collision_detection/src/lib/collision_detection/bounding_sphere.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/bounding_sphere.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/bounding_sphere.cc	(revision 5882)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "bounding_sphere.h"
@@ -24,7 +24,7 @@
  *  standard constructor
 */
-BoundingSphere::BoundingSphere () 
+BoundingSphere::BoundingSphere ()
 {
-   this->setClassID(CL_BOUNDING_SPHERE, "BoundingSphere"); 
+   this->setClassID(CL_BOUNDING_SPHERE, "BoundingSphere");
 }
 
@@ -34,5 +34,5 @@
 
 */
-BoundingSphere::~BoundingSphere () 
+BoundingSphere::~BoundingSphere ()
 {
   // delete what has to be deleted here
Index: branches/collision_detection/src/lib/collision_detection/bounding_volume.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/bounding_volume.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/bounding_volume.cc	(revision 5882)
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "bounding_volume.h"
@@ -27,5 +27,7 @@
 {
   this->setClassID(CL_BOUNDING_VOLUME, "BoundingVolume");
-  this->vertices = NULL;
+  this->modelInf = NULL;
+  this->triangleIndexes = NULL;
+  this->triangleIndexesLength = 0;
 }
 
Index: branches/collision_detection/src/lib/collision_detection/bv_tree.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/bv_tree.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/bv_tree.cc	(revision 5882)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "bv_tree.h"
@@ -25,7 +25,7 @@
  *  standard constructor
 */
-BVTree::BVTree () 
+BVTree::BVTree ()
 {
-   this->setClassID(CL_BV_TREE, "BVTree"); 
+   this->setClassID(CL_BV_TREE, "BVTree");
 
 }
@@ -36,5 +36,5 @@
 
 */
-BVTree::~BVTree () 
+BVTree::~BVTree ()
 {
   // delete what has to be deleted here
Index: branches/collision_detection/src/lib/collision_detection/bv_tree.h
===================================================================
--- branches/collision_detection/src/lib/collision_detection/bv_tree.h	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/bv_tree.h	(revision 5882)
@@ -18,4 +18,5 @@
 class WorldEntity;
 
+//! draw mode for the bounding volume
 typedef enum DrawMode
 {
@@ -33,26 +34,17 @@
 
 //! A class that represents a bounding volume tree
-class BVTree : public BaseObject {
+class BVTree : public BaseObject
+{
 
- public:
-  BVTree();
-  virtual ~BVTree();
+  public:
+    BVTree();
+    virtual ~BVTree();
 
-  virtual void spawnBVTree(sVec3D *verticesList, const int length) = 0;
-  virtual void spawnBVTree(const modelInfo& modelInf) = 0;
-  virtual void flushTree() = 0;
+    virtual void spawnBVTree(const modelInfo& modelInf) = 0;
+    virtual void flushTree() = 0;
 
-  virtual void collideWith(const WorldEntity& entity1, const WorldEntity& entity2) const = 0;
+    virtual void collideWith(const WorldEntity& entity1, const WorldEntity& entity2) const = 0;
 
-  /** @param depth: depth, @param drawMode: how to draw the Model */
-  virtual void drawBV(int depth, int drawMode) const = 0;
-
-
- protected:
-  int numberOfVertices;
-
- private:
-
-
+    virtual void drawBV(int depth, int drawMode) const = 0;
 };
 
Index: branches/collision_detection/src/lib/collision_detection/bv_tree_node.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/bv_tree_node.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/bv_tree_node.cc	(revision 5882)
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "bv_tree_node.h"
Index: branches/collision_detection/src/lib/collision_detection/bv_tree_node.h
===================================================================
--- branches/collision_detection/src/lib/collision_detection/bv_tree_node.h	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/bv_tree_node.h	(revision 5882)
@@ -8,9 +8,11 @@
 #define _BV_TREE_NODE_H
 
+
 #include "base_object.h"
 #include "abstract_model.h"
 #include "vector.h"
 
-// FORWARD DECLARATION
+
+// forward declarations
 class BoundingVolume;
 class BVTree;
@@ -29,11 +31,9 @@
 
   virtual const BoundingVolume* getBV() const = 0;
+  /** returns the index of this bounding volume tree node @returns index of this index */
   inline const int getIndex() const { return this->treeIndex; }
 
-  virtual void spawnBVTree(const sVec3D *verticesList, unsigned int length ) = 0;
   virtual void spawnBVTree(const modelInfo& modInfo, const int* triangleIndexes, unsigned int length) = 0;
-
   virtual void collideWith(const BVTreeNode& treeNode, const WorldEntity& nodeA, const WorldEntity& nodeB) const = 0;
-
   virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const = 0;
 
Index: branches/collision_detection/src/lib/collision_detection/cd_engine.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/cd_engine.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/cd_engine.cc	(revision 5882)
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "cd_engine.h"
@@ -168,6 +168,6 @@
 void CDEngine::debugSpawnTree(int depth, sVec3D* vertices, int numVertices)
 {
-  if ( this->rootTree == NULL)
-    this->rootTree = new OBBTree(depth, vertices, numVertices);
+//   if ( this->rootTree == NULL)
+//     this->rootTree = new OBBTree(depth, vertices, numVertices);
 }
 
Index: branches/collision_detection/src/lib/collision_detection/collision.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/collision.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/collision.cc	(revision 5882)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "collision.h"
@@ -24,7 +24,7 @@
  *  standard constructor
 */
-Collision::Collision () 
+Collision::Collision ()
 {
-   this->setClassID(CL_COLLISION, "Collision"); 
+   this->setClassID(CL_COLLISION, "Collision");
 
 }
@@ -35,5 +35,5 @@
 
 */
-Collision::~Collision () 
+Collision::~Collision ()
 {
   // delete what has to be deleted here
Index: branches/collision_detection/src/lib/collision_detection/obb.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/obb.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/obb.cc	(revision 5882)
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_DETECTION
 
 #include "obb.h"
Index: branches/collision_detection/src/lib/collision_detection/obb_tree.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/obb_tree.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/obb_tree.cc	(revision 5882)
@@ -31,13 +31,4 @@
  *  standard constructor
 */
-OBBTree::OBBTree(int depth, sVec3D *verticesList, const int length)
-  : BVTree()
-{
-  this->depth = depth;
-  this->init();
-  this->spawnBVTree(verticesList, length);
-}
-
-
 OBBTree::OBBTree(int depth, const modelInfo& modelInf)
   : BVTree()
@@ -66,16 +57,4 @@
 }
 
-
-void OBBTree::spawnBVTree(sVec3D *verticesList, const int length)
-{
-  if( unlikely(this->rootNode != NULL))
-    {
-      PRINTF(2)("The BVTree has already been spawned, flushing and respawning again...\n");
-      this->flushTree();
-    }
-  OBBTreeNode* node = new OBBTreeNode(*this, depth);
-  this->rootNode = node;
-  this->rootNode->spawnBVTree(verticesList, length);
-}
 
 
@@ -150,5 +129,5 @@
     }
 
-  this->spawnBVTree(vertList, length);
+//   this->spawnBVTree(vertList, length);
 
   PRINT(0)("=  Spawning Tree: Finished\n");
Index: branches/collision_detection/src/lib/collision_detection/obb_tree.h
===================================================================
--- branches/collision_detection/src/lib/collision_detection/obb_tree.h	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/obb_tree.h	(revision 5882)
@@ -17,21 +17,21 @@
 
 //! A class for representing an obb tree
-class OBBTree : public BVTree {
+class OBBTree : public BVTree
+{
 
   public:
-    OBBTree(int depth, sVec3D *verticesList, const int length);
     OBBTree(int depth, const modelInfo& modInfo);
     virtual ~OBBTree();
     void init();
 
-    virtual void spawnBVTree(sVec3D *verticesList, const int length);
     virtual void spawnBVTree(const modelInfo& modelInf);
     virtual void flushTree();
 
     virtual void collideWith(const WorldEntity& entity1, const WorldEntity& entity2) const;
-
     virtual void drawBV(int depth, int drawMode) const;
 
+    /** returns the next if for the obb tree node @return integer id number of the next node */
     const int getID() { return ++this->id;}
+    /** returns the root node of the bounding volume tree @return reference to the root node */
     inline const OBBTreeNode* getRootNode() const { return this->rootNode; }
 
Index: branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc	(revision 5882)
@@ -17,8 +17,7 @@
 
 #include "obb_tree_node.h"
-#include "list.h"
-#include <list>
+#include "obb_tree.h"
 #include "obb.h"
-#include "obb_tree.h"
+
 #include "matrix.h"
 #include "abstract_model.h"
@@ -26,7 +25,8 @@
 
 #include "color.h"
-
+#include "glincl.h"
+
+#include <list>
 #include "debug.h"
-#include "glincl.h"
 
 
@@ -34,12 +34,12 @@
 using namespace std;
 
-float**  OBBTreeNode::coMat = NULL;
-float**  OBBTreeNode::eigvMat = NULL;
-float*   OBBTreeNode::eigvlMat = NULL;
-int*     OBBTreeNode::rotCount = NULL;
+
 GLUquadricObj* OBBTreeNode_sphereObj = NULL;
+
 
 /**
  *  standard constructor
+ * @param tree: reference to the obb tree
+ * @param depth: the depth of the obb tree to generate
  */
 OBBTreeNode::OBBTreeNode (const OBBTree& tree, unsigned int depth)
@@ -55,25 +55,9 @@
   this->bvElement = NULL;
 
-  this->tmpVert1 = NULL;
-  this->tmpVert2 = NULL;
-
-  if( OBBTreeNode::coMat == NULL)
-  {
-    OBBTreeNode::coMat = new float*[4];
-    for(int i = 0; i < 4; i++)
-      OBBTreeNode::coMat[i] = new float[4];
-  }
-  if( OBBTreeNode::eigvMat == NULL)
-  {
-    OBBTreeNode::eigvMat = new float*[4];
-    for( int i = 0; i < 4; i++)
-      OBBTreeNode::eigvMat[i] = new float[4];
-  }
-  if( OBBTreeNode::eigvlMat == NULL)
-  {
-    OBBTreeNode::eigvlMat = new float[4];
-  }
-  if( OBBTreeNode::rotCount == NULL)
-    OBBTreeNode::rotCount = new int;
+  this->triangleIndexList1 = NULL;
+  this->triangleIndexList2 = NULL;
+
+  this->modelInf = NULL;
+  this->triangleIndexes = NULL;
 
   if( OBBTreeNode_sphereObj == NULL)
@@ -88,21 +72,15 @@
 {
   if( this->nodeLeft)
-  {
     delete this->nodeLeft;
-    this->nodeLeft = NULL;
-  }
   if( this->nodeRight)
-  {
     delete this->nodeRight;
-    this->nodeRight = NULL;
-  }
+
   if( this->bvElement)
     delete this->bvElement;
-  this->bvElement = NULL;
-
-  if (this->tmpVert1 != NULL)
-    delete this->tmpVert1;
-  if (this->tmpVert2 != NULL)
-    delete this->tmpVert2;
+
+  if( this->triangleIndexList1 != NULL)
+    delete [] this->triangleIndexList1;
+  if( this->triangleIndexList2 != NULL)
+    delete [] this->triangleIndexList2;
 }
 
@@ -118,8 +96,7 @@
 void OBBTreeNode::spawnBVTree(const modelInfo& modelInf, const int* triangleIndexes, unsigned int length)
 {
-  sVec3D* verticesList;
-
-  PRINTF(3)("OBB Depth: %i, tree index: %i, numVertices: %i\n", depth, treeIndex, length);
-  printf("OBBTreeNode::spawnBVTree()\n");
+  PRINTF(3)("\n==============================Creating OBB Tree Node==================\n");
+  PRINT(3)(" OBB Tree Infos: \n");
+  PRINT(3)("\tDepth: %i \n\tTree Index: %i \n\tNumber of Vertices: %i\n", depth, treeIndex, length);
   this->depth = depth;
 
@@ -137,95 +114,30 @@
   if( likely( this->depth > 0))
   {
-    //this->forkBox(*this->bvElement);
-
-
-    //     if(this->tmpLen1 > 2)
-    //     {
-    //       OBBTreeNode* node1 = new OBBTreeNode();
-    //       this->nodeLeft = node1;
-    //       this->nodeLeft->spawnBVTree(depth - 1, this->tmpVert1, this->tmpLen1);
-    //     }
-    //     else
-    //     {
-    //       PRINTF(3)("Aboarding tree walk: less than 3 vertices left\n");
-    //     }
-    //
-    //     if( this->tmpLen2 > 2)
-    //     {
-    //       OBBTreeNode* node2 = new OBBTreeNode();
-    //       this->nodeRight = node2;
-    //       this->nodeRight->spawnBVTree(depth - 1, this->tmpVert2, this->tmpLen2);
-    //     }
-    //     else
-    //     {
-    //       PRINTF(3)("Abording tree walk: less than 3 vertices left\n");
-    //     }
-
-  }
-}
+    this->forkBox(*this->bvElement);
+
+    if( this->triangleIndexLength1 >= 3)
+    {
+      this->nodeLeft = new OBBTreeNode(*this->obbTree, depth - 1);
+      this->nodeLeft->spawnBVTree(modelInf, this->triangleIndexList1, this->triangleIndexLength1);
+    }
+    if( this->triangleIndexLength2 >= 3)
+    {
+      this->nodeRight = new OBBTreeNode(*this->obbTree, depth - 1);
+      this->nodeRight->spawnBVTree(modelInf, this->triangleIndexList2, this->triangleIndexLength2);
+    }
+  }
+}
+
 
 
 /**
- *  creates a new BVTree or BVTree partition
- * @param depth: how much more depth-steps to go: if == 1 don't go any deeper!
- * @param verticesList: the list of vertices of the object - each vertices triple is interpreted as a triangle
- *
- * this function creates an Bounding Volume tree from a vertices soup (no triangle data)
+ *  calculate the box covariance matrix
+ * @param box: reference to the box
+ * @param modelInf: the model info structure of the model
+ * @param tirangleIndexes: an array with the indexes of the triangles inside this
+ * @param length: the length of the indexes array
  */
-void OBBTreeNode::spawnBVTree(const sVec3D *verticesList, unsigned int length)
-{
-  //   PRINTF(3)("\n");
-  //   PRINTF(3)("OBB Depth: %i, tree index: %i, numVertices: %i\n", depth, treeIndex, length);
-  //   this->depth = depth;
-  //
-  //
-  //   this->bvElement = new OBB();
-  //   this->bvElement->vertices = verticesList;
-  //   this->bvElement->numOfVertices = length;
-  //   PRINTF(3)("Created OBBox\n");
-  //   this->calculateBoxCovariance(this->bvElement, verticesList, length);
-  //   PRINTF(3)("Calculated attributes1\n");
-  //   this->calculateBoxEigenvectors(this->bvElement, verticesList, length);
-  //   PRINTF(3)("Calculated attributes2\n");
-  //   this->calculateBoxAxis(this->bvElement, verticesList, length);
-  //   PRINTF(3)("Calculated attributes3\n");
-  //
-  //
-  //
-  //   if( likely( this->depth > 0))
-  //   {
-  //     this->forkBox(this->bvElement);
-  //
-  //
-  //     if(this->tmpLen1 > 2)
-  //     {
-  //       OBBTreeNode* node1 = new OBBTreeNode(this->obbTree);
-  //       this->nodeLeft = node1;
-  //       this->nodeLeft->spawnBVTree(depth - 1, this->tmpVert1, this->tmpLen1);
-  //     }
-  //     else
-  //     {
-  //       PRINTF(3)("Aboarding tree walk: less than 3 vertices left\n");
-  //     }
-  //
-  //     if( this->tmpLen2 > 2)
-  //     {
-  //       OBBTreeNode* node2 = new OBBTreeNode(this->obbTree);
-  //       this->nodeRight = node2;
-  //       this->nodeRight->spawnBVTree(depth - 1, this->tmpVert2, this->tmpLen2);
-  //     }
-  //     else
-  //     {
-  //       PRINTF(3)("Abording tree walk: less than 3 vertices left\n");
-  //     }
-  //   }
-}
-
-
 void OBBTreeNode::calculateBoxCovariance(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, unsigned int length)
 {
-
-  PRINTF(3)("Created OBBox\n");
-
   float     facelet[length];                         //!< surface area of the i'th triangle of the convex hull
   float     face = 0.0f;                             //!< surface area of the entire convex hull
@@ -288,12 +200,12 @@
   for(int j = 0; j < 3; ++j)
   {
-    PRINTF(3)(" |");
+    PRINT(3)("\t\t");
     for(int k = 0; k < 3; ++k)
     {
-      PRINTF(3)(" \b%f ", covariance[j][k]);
-    }
-    PRINTF(3)(" |\n");
-  }
-  PRINTF(3)("OBB Center: %f, %f, %f\n", center.x, center.y, center.z);
+      PRINT(3)("%11.2f\t", covariance[j][k]);
+    }
+    PRINT(3)("\n");
+  }
+  PRINTF(3)("\nOBB Center:\n\t\t%11.2f\t %11.2f\t %11.2f\n", center.x, center.y, center.z);
 
   /* write back the covariance matrix data to the object oriented bouning box */
@@ -320,6 +232,4 @@
 {
 
-  PRINTF(3)("Calculate the Box Eigenvectors\n");
-
   Vector         axis[3];                            //!< the references to the obb axis
   Matrix         covMat(  box.covarianceMatrix  );   //!< covariance matrix (in the matrix dataform)
@@ -339,8 +249,8 @@
   box.axis[2] = axis[2];
 
-  PRINTF(0)("-- Got Axis\n");
-  PRINTF(0)("Eigenvector: %f, %f, %f\n", box.axis[0].x, box.axis[0].y, box.axis[0].z);
-  PRINTF(0)("Eigenvector: %f, %f, %f\n", box.axis[1].x, box.axis[1].y, box.axis[1].z);
-  PRINTF(0)("Eigenvector: %f, %f, %f\n", box.axis[2].x, box.axis[2].y, box.axis[2].z);
+  PRINTF(3)("Eigenvectors:\n");
+  PRINT(3)("\t\t%11.2f \t%11.2f \t%11.2f\n", box.axis[0].x, box.axis[0].y, box.axis[0].z);
+  PRINT(3)("\t\t%11.2f \t%11.2f \t%11.2f\n", box.axis[1].x, box.axis[1].y, box.axis[1].z);
+  PRINT(3)("\t\t%11.2f \t%11.2f \t%11.2f\n", box.axis[2].x, box.axis[2].y, box.axis[2].z);
 }
 
@@ -361,15 +271,15 @@
 
 
-  PRINTF(3)("Calculated attributes3\n");
+  PRINTF(3)("Calculate Box Axis\n");
   /* now get the axis length */
   Line                ax[3];                                 //!< the axis
   float               halfLength[3];                         //!< half length of the axis
   float               tmpLength;                             //!< tmp save point for the length
-  Plane               p0(box.axis[0], box.center);        //!< the axis planes
-  Plane               p1(box.axis[1], box.center);
-  Plane               p2(box.axis[2], box.center);
-  float               maxLength[3];
-  float               minLength[3];
-  const sVec3D*       tmpVec;
+  Plane               p0(box.axis[0], box.center);           //!< the axis planes
+  Plane               p1(box.axis[1], box.center);           //!< the axis planes
+  Plane               p2(box.axis[2], box.center);           //!< the axis planes
+  float               maxLength[3];                          //!< maximal lenth of the axis
+  float               minLength[3];                          //!< minimal length of the axis
+  const sVec3D*       tmpVec;                                //!< variable taking tmp vectors
 
   /*
@@ -476,11 +386,13 @@
   for(int i = 0; i < 3; ++i)
   {
-    PRINTF(3)("max: %f, min: %f \n", maxLength[i], minLength[i]);
     centerOffset[i] = (maxLength[i] + minLength[i]) / 2.0f;       // min length is negatie
     newHalfLength[i] = (maxLength[i] - minLength[i]) / 2.0f;      // min length is negative
-    box.center +=  (box.axis[i] * centerOffset[i]);            // update the new center vector
+    box.center +=  (box.axis[i] * centerOffset[i]);               // update the new center vector
     halfLength[i] = newHalfLength[i];
   }
-
+  PRINTF(3)("\n");
+  PRINT(3)("\tmax: %11.2f, \tmin: %11.2f\n", maxLength[0], minLength[0]);
+  PRINT(3)("\tmax: %11.2f, \tmin: %11.2f\n", maxLength[1], minLength[1]);
+  PRINT(3)("\tmax: %11.2f, \tmin: %11.2f\n", maxLength[2], minLength[2]);
 
 
@@ -488,6 +400,4 @@
   box.halfLength[1] = halfLength[1];
   box.halfLength[2] = halfLength[2];
-  PRINTF(3)("-- Written Axis to obb\n");
-  PRINTF(3)("-- Finished Calculating Attributes\n");
 }
 
@@ -503,38 +413,30 @@
 {
 
+  PRINTF(3)("Fork Box\n");
+  PRINTF(4)("Calculating the longest Axis\n");
   /* get the longest axis of the box */
-  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.halfLength[i])
-    {
-      aLength = box.halfLength[i];
-      axisIndex = i;
-    }
-  }
-
-  PRINTF(3)("longest axis is: nr %i with a half-length of: %f\n", axisIndex, aLength);
-
-
+  float               longestAxis = -1.0f;                 //!< the length of the longest axis
+  int                 longestAxisIndex = 0;                //!< this is the nr of the longest axis
+
+
+  /* now get the longest axis of the three exiting */
+  for( int i = 0; i < 3; ++i)
+  {
+    if( longestAxis < box.halfLength[i])
+    {
+      longestAxis = box.halfLength[i];
+      longestAxisIndex = i;
+    }
+  }
+  PRINTF(3)("\nLongest Axis is: Nr %i with a half-length of:%11.2f\n", longestAxisIndex, longestAxis);
+
+
+  PRINTF(4)("Separating along the longest axis\n");
   /* get the closest vertex near the center */
   float               dist = 999999.0f;                    //!< the smallest distance to each vertex
-  float               tmpDist;                             //!< temporary distance
-  int                 vertexIndex;
-  Plane               middlePlane(box.axis[axisIndex], box.center); //!< the middle plane
-
-  vertexIndex = 0;
-  for(int i = 0; i < box.numOfVertices; ++i)
-  {
-    tmpDist = fabs(middlePlane.distancePoint(box.vertices[i]));
-    if( tmpDist < dist)
-    {
-      dist = tmpDist;
-      vertexIndex = i;
-    }
-  }
-
-  PRINTF(3)("\nthe clostest vertex is nr: %i, with a dist of: %f\n", vertexIndex ,dist);
+  float               tmpDist;                             //!< variable to save diverse distances temporarily
+  int                 vertexIndex;                         //!< index of the vertex near the center
+  Plane               middlePlane(box.axis[longestAxisIndex], box.center); //!< the middle plane
+  const sVec3D*       tmpVec;                              //!< temp simple 3D vector
 
 
@@ -542,90 +444,61 @@
   the points depending on which side they are located
   */
-  std::list<const sVec3D*> partition1;                           //!< the vertex partition 1
-  std::list<const sVec3D*> partition2;                           //!< the vertex partition 2
-
-
-  //nameList.push_back("Pumba");
-  //nameList.push_back("Mogli");
-  //nameList.push_back("Timon");
-
-//   std::list<char*>::iterator element;
-//   for (element = nameList.begin(); element != nameList.end(); element++)
-//   {
-//     PRINTF(3)("found name: %s in list\n", (*name));
-//   }
-
-
-
-  PRINTF(3)("vertex index: %i, of %i\n", vertexIndex, box.numOfVertices);
-  this->separationPlane = Plane(box.axis[axisIndex], box.vertices[vertexIndex]);  //!< separation plane
-  this->sepPlaneCenter = &box.vertices[vertexIndex];
-  this->longestAxisIndex = axisIndex;
-
-  for(int i = 0; i < box.numOfVertices; ++i)
-  {
-    if( i == vertexIndex)
-      continue;
-    tmpDist = this->separationPlane.distancePoint(box.vertices[i]);
-    if( tmpDist > 0.0)
-      partition1.push_back(&box.vertices[i]); /* positive numbers plus zero */
+  std::list<int>           partition1;                           //!< the vertex partition 1
+  std::list<int>           partition2;                           //!< the vertex partition 2
+  float*                   triangleCenter;                       //!< the center of the triangle
+  const float*             a;                                    //!< triangle  edge a
+  const float*             b;                                    //!< triangle  edge b
+  const float*             c;                                    //!< triangle  edge c
+
+  this->separationPlane = Plane(box.axis[longestAxisIndex], box.center);
+  this->sepPlaneCenter[0] = box.center.x;
+  this->sepPlaneCenter[1] = box.center.y;
+  this->sepPlaneCenter[2] = box.center.z;
+  this->longestAxisIndex = longestAxisIndex;
+
+  for( int i = 0; i < box.triangleIndexesLength; ++i)
+  {
+    /* first calculate the middle of the triangle */
+    a = &box.modelInf->pVertices[box.modelInf->pTriangles[box.triangleIndexes[i]].indexToVertices[0]];
+    b = &box.modelInf->pVertices[box.modelInf->pTriangles[box.triangleIndexes[i]].indexToVertices[1]];
+    c = &box.modelInf->pVertices[box.modelInf->pTriangles[box.triangleIndexes[i]].indexToVertices[2]];
+
+    triangleCenter[0] = (a[0] + b[0] + c[0])/3.0f;
+    triangleCenter[1] = (a[1] + b[1] + c[1])/3.0f;
+    triangleCenter[2] = (a[2] + b[2] + c[2])/3.0f;
+
+    tmpDist = this->separationPlane.distancePoint(*((sVec3D*)triangleCenter));
+    if( tmpDist > 0.0f)
+      partition1.push_back(i); /* positive numbers plus zero */
     else
-      partition2.push_back(&box.vertices[i]); /* negatice numbers */
-  }
-  partition1.push_back(&box.vertices[vertexIndex]);
-  partition2.push_back(&box.vertices[vertexIndex]);
-
-  PRINTF(3)("\npartition1: got %i vertices/ partition 2: got %i vertices\n", partition1.size(), partition2.size());
+      partition2.push_back(i); /* negatice numbers */
+  }
+  PRINTF(3)("\nPartition1: got \t%i Vertices \nPartition2: got \t%i Vertices\n", partition1.size(), partition2.size());
 
 
   /* now comes the separation into two different sVec3D arrays */
-  tIterator<const sVec3D>* iterator;                       //!< the iterator to go through the lists
   int                index;                                //!< index storage place
-  sVec3D*            vertList1;                            //!< the vertex list 1
-  sVec3D*            vertList2;                            //!< the vertex list 2
-  std::list<const sVec3D*>::iterator element;              //!< the list iterator
-
-  vertList1 = new sVec3D[partition1.size()];
-  vertList2 = new sVec3D[partition2.size()];
-
-
-  for(element = partition1.begin(), index = 0; element != partition1.end(); element++, index++)
-  {
-    vertList1[index][0] = (*element)[0][0];
-    vertList1[index][1] = (*element)[0][1];
-    vertList1[index][2] = (*element)[0][2];
-    ++index;
-  }
-
-  //   PRINTF(0)("\npartition 1:\n");
-  //   for(int i = 0; i < partition1.getSize(); ++i)
-  //   {
-  //     PRINTF(0)("v[%i][0] = %f,\tv[%i][1] = %f,\tv[%i][1] = %f\n", i, vertList1[i][0], i, vertList1[i][1], i, vertList1[i][2]);
-  //   }
-
-
-
-  for(element = partition2.begin(), index = 0; element != partition2.end(); element++, index++)
-  {
-    vertList2[index][0] = (*element)[0][0];
-    vertList2[index][1] = (*element)[0][1];
-    vertList2[index][2] = (*element)[0][2];
-  }
-
-  if (this->tmpVert1 != NULL)
-    delete[] this->tmpVert1;
-  this->tmpVert1 = vertList1;
-  if (this->tmpVert2 != NULL)
-    delete[] this->tmpVert2;
-  this->tmpVert2 = vertList2;
-  this->tmpLen1 = partition1.size();
-  this->tmpLen2 = partition2.size();
-
-
-  //   PRINTF(0)("\npartition 2:\n");
-  //   for(int i = 0; i < partition2.getSize(); ++i)
-  //   {
-  //     PRINTF(0)("v[%i][0] = %f,\tv[%i][1] = %f,\tv[%i][1] = %f\n", i, vertList2[i][0], i,  vertList2[i][1], i, vertList2[i][2]);
-  //   }
+  int*               triangleIndexList1;                   //!< the vertex list 1
+  int*               triangleIndexList2;                   //!< the vertex list 2
+  std::list<int>::iterator element;                        //!< the list iterator
+
+  triangleIndexList1 = new int[partition1.size()];
+  triangleIndexList2 = new int[partition2.size()];
+
+  for( element = partition1.begin(), index = 0; element != partition1.end(); element++, index++)
+    triangleIndexList1[index] = (*element);
+
+  for( element = partition2.begin(), index = 0; element != partition2.end(); element++, index++)
+    triangleIndexList2[index] = (*element);
+
+  if( this->triangleIndexList1!= NULL)
+    delete[] this->triangleIndexList1;
+  this->triangleIndexList1 = triangleIndexList1;
+  this->triangleIndexLength1 = partition1.size();
+
+  if( this->triangleIndexList2 != NULL)
+    delete[] this->triangleIndexList2;
+  this->triangleIndexList2 = triangleIndexList2;
+  this->triangleIndexLength2 = partition2.size();
 }
 
@@ -814,12 +687,12 @@
       if( drawMode & DRAW_POINTS)
         glBegin(GL_POINTS);
-      for(int i = 0; i < this->bvElement->numOfVertices; ++i)
+      for( int i = 0; i < this->bvElement->modelInf->numVertices; i+=3)
       {
         if( drawMode & DRAW_POINTS)
-          glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
+          glVertex3f(this->bvElement->modelInf->pVertices[i], this->bvElement->modelInf->pVertices[i+1], this->bvElement->modelInf->pVertices[i+2]);
         else
         {
           glPushMatrix();
-          glTranslatef(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
+          glVertex3f(this->bvElement->modelInf->pVertices[i], this->bvElement->modelInf->pVertices[i+1], this->bvElement->modelInf->pVertices[i+2]);
           gluSphere(OBBTreeNode_sphereObj, 0.1, 10, 10);
           glPopMatrix();
Index: branches/collision_detection/src/lib/collision_detection/obb_tree_node.h
===================================================================
--- branches/collision_detection/src/lib/collision_detection/obb_tree_node.h	(revision 5870)
+++ branches/collision_detection/src/lib/collision_detection/obb_tree_node.h	(revision 5882)
@@ -11,6 +11,5 @@
 
 
-
-// FORWARD DECLARATION
+// forward declarations
 class BoundingVolume;
 class OBB;
@@ -18,5 +17,5 @@
 class Plane;
 class PNode;
-//struct sVec3D;
+
 
 //! A class that represents a bounding volume tree
@@ -29,11 +28,7 @@
     virtual ~OBBTreeNode();
 
-    /*  this function returns the bounding volume of this tree node @return: returns the BV */
-    virtual inline const BoundingVolume* getBV() const
-    {
-      return (BoundingVolume*)this->bvElement;
-    }
+    /**  this function returns the bounding volume of this tree node @return: returns the BV */
+    virtual inline const BoundingVolume* getBV() const { return (BoundingVolume*)this->bvElement; }
 
-    virtual void spawnBVTree(const sVec3D *verticesList, unsigned int length);
     virtual void spawnBVTree(const modelInfo& modelInf, const int* triangleIndexes, unsigned int length);
 
@@ -68,21 +63,13 @@
     const int*          triangleIndexes;            //!< indexes to the used model triangles
 
-    const sVec3D*       vertices;                   //!< pointer to the vertices data
-    int                 numOfVertices;              //!< number of vertices in vertices data
     Plane               separationPlane;            //!< the separation plane of the obb
-    const sVec3D*       sepPlaneCenter;             //!< only needed to draw plane
+    sVec3D              sepPlaneCenter;             //!< only needed to draw plane
     int                 longestAxisIndex;           //!< only needed to draw plane
 
     /* tmp saving place for obb variables */
-    sVec3D*             tmpVert1;                   //!< pointer to the vert data of obbox1
-    sVec3D*             tmpVert2;                   //!< pointer to the vert data of obbox1
-    int                 tmpLen1;                    //!< len vert data obbox1
-    int                 tmpLen2;                    //!< len vert data obbox2
-
-    static float**      coMat;
-    static float**      eigvMat;
-    static float*       eigvlMat;
-    static int*         rotCount;
-
+    int*                triangleIndexList1;         //!< pointer to the vert data of obbox1
+    int*                triangleIndexList2;         //!< pointer to the vert data of obbox1
+    int                 triangleIndexLength1;       //!< len vert data obbox1
+    int                 triangleIndexLength2;       //!< len vert data obbox2
 };
 
Index: branches/collision_detection/src/world_entities/environment.cc
===================================================================
--- branches/collision_detection/src/world_entities/environment.cc	(revision 5870)
+++ branches/collision_detection/src/world_entities/environment.cc	(revision 5882)
@@ -38,6 +38,6 @@
   this->loadModel("models/ships/bolido.obj");
 
-  if(this->obbTree == NULL)
-    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
+//   if(this->obbTree == NULL)
+//     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
 }
 
Index: branches/collision_detection/src/world_entities/test_entity.cc
===================================================================
--- branches/collision_detection/src/world_entities/test_entity.cc	(revision 5870)
+++ branches/collision_detection/src/world_entities/test_entity.cc	(revision 5882)
@@ -37,5 +37,5 @@
 //   this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx");
 // this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp");
-  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
+//   this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
 
   this->md2Model->setAnim(RUN);
