Index: /orxonox/trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- /orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4625)
+++ /orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4626)
@@ -65,5 +65,5 @@
   this->rootNode = node;
   this->rootNode->setTreeRef(this);
-  this->rootNode->spawnBVTree(depth, verticesList, length);
+  this->rootNode->spawnBVTree(--depth, verticesList, length);
 }
 
Index: /orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- /orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4625)
+++ /orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4626)
@@ -71,12 +71,16 @@
 void OBBTreeNode::spawnBVTree(const int depth, sVec3D *verticesList, const int length)
 {
+  printf("OBB Depth: %i\n", depth);
   this->depth = depth;
 
   this->bvElement = this->createBox();
+  PRINTF(0)("Created OBBox\n");
   this->calculateBoxAttributes(this->bvElement, verticesList, length);
+  PRINTF(0)("Calculated attributes\n");
 
   if( likely( this->depth > 0))
   {
     this->forkBox(this->bvElement);
+
   }
 }
@@ -126,5 +130,5 @@
   /* take the average of the centroid sum */
   center /= face;
-
+  PRINTF(0)("-- Calculated Center\n");
 
 
@@ -145,10 +149,11 @@
     }
   }
-
-  printf("\nVertex Data:\n");
-  for(int i = 0; i < length; i++)
-  {
-    printf("vertex %i: %f, %f, %f\n", i, verticesList[i][0], verticesList[i][1], verticesList[i][2]);
-  }
+  PRINTF(0)("-- Calculated Covariance\n");
+
+//   printf("\nVertex Data:\n");
+//   for(int i = 0; i < length; i++)
+//   {
+//     printf("vertex %i: %f, %f, %f\n", i, verticesList[i][0], verticesList[i][1], verticesList[i][2]);
+//   }
 
   printf("\nCovariance Matrix:\n");
@@ -173,5 +178,5 @@
   }
   *box->center = center;
-
+  PRINTF(0)("-- Written Result to obb\n");
 
   /* now getting spanning vectors of the sub-space:
@@ -197,16 +202,17 @@
 
   Jacobi(C, D, V);                                            /* do the jacobi decomposition */
-
-  printf("\nwe got a result! YES: \n");
-
-  for(int j = 1; j < 4; ++j)
-  {
-    printf(" |");
-    for(int k = 1; k < 4; ++k)
-    {
-      printf(" \b%f ", V(j, k));
-    }
-    printf(" |\n");
-  }
+  PRINTF(0)("-- Done Jacobi Decomposition\n");
+
+//   printf("\nwe got a result! YES: \n");
+//
+//   for(int j = 1; j < 4; ++j)
+//   {
+//     printf(" |");
+//     for(int k = 1; k < 4; ++k)
+//     {
+//       printf(" \b%f ", V(j, k));
+//     }
+//     printf(" |\n");
+//   }
 
   axis[0] = new Vector(V(1, 1), V(2, 1), V(3, 1));
@@ -214,8 +220,13 @@
   axis[2] = new Vector(V(1, 3), V(2, 3), V(3, 3));
   box->axis = axis;
-
-  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);
+  PRINTF(0)("-- Got Axis\n");
+
+//   delete &V;
+//   delete &D;
+//   delete &V;
+
+//   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);
 
 
@@ -253,9 +264,10 @@
 
   box->halfLength = halfLength;
-
-
-  printf("\nwe got length: \n");
-  for(int i = 0; i < 3; ++i)
-    printf("length[%i] = %f\n", i, box->halfLength[i]);
+  PRINTF(0)("-- Written Axis to obb\n");
+
+
+//   printf("\nwe got length: \n");
+//   for(int i = 0; i < 3; ++i)
+//     printf("length[%i] = %f\n", i, box->halfLength[i]);
 }
 
@@ -346,11 +358,11 @@
   }
 
-  printf("\npartition 1:\n");
-  for(int i = 0; i < partition1.getSize(); ++i)
-  {
-    printf("v[%i][0] = %f\n", i, vertList1[i][0]);
-    printf("v[%i][1] = %f\n", i, vertList1[i][1]);
-    printf("v[%i][2] = %f\n", i, vertList1[i][2]);
-  }
+//   printf("\npartition 1:\n");
+//   for(int i = 0; i < partition1.getSize(); ++i)
+//   {
+//     printf("v[%i][0] = %f\n", i, vertList1[i][0]);
+//     printf("v[%i][1] = %f\n", i, vertList1[i][1]);
+//     printf("v[%i][2] = %f\n", i, vertList1[i][2]);
+//   }
 
   iterator = partition2.getIterator();
@@ -366,11 +378,12 @@
   }
 
-  printf("\npartition 2:\n");
-  for(int i = 0; i < partition2.getSize(); ++i)
-  {
-    printf("v[%i][0] = %f\n", i, vertList2[i][0]);
-    printf("v[%i][1] = %f\n", i, vertList2[i][1]);
-    printf("v[%i][2] = %f\n", i, vertList2[i][2]);
-  }
+  //delete iterator;
+//   printf("\npartition 2:\n");
+//   for(int i = 0; i < partition2.getSize(); ++i)
+//   {
+//     printf("v[%i][0] = %f\n", i, vertList2[i][0]);
+//     printf("v[%i][1] = %f\n", i, vertList2[i][1]);
+//     printf("v[%i][2] = %f\n", i, vertList2[i][2]);
+//   }
 
   /* now spawn the obb tree: create the nodes and descent */
@@ -386,6 +399,10 @@
 
 
+
+
 void OBBTreeNode::collideWith(const BVTree &tree)
 {}
+
+
 
 
Index: /orxonox/trunk/src/subprojects/collision_detection/Makefile.am
===================================================================
--- /orxonox/trunk/src/subprojects/collision_detection/Makefile.am	(revision 4625)
+++ /orxonox/trunk/src/subprojects/collision_detection/Makefile.am	(revision 4626)
@@ -13,4 +13,6 @@
                   $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) \
                   -lpthread
+
+
 
 collision_CPPFLAGS =  -DGUI_MODULE \
@@ -39,7 +41,7 @@
                    $(MAINSRCDIR)/lib/coord/p_node.cc \
                    $(MAINSRCDIR)/lib/coord/null_parent.cc \
-                   $(MAINSRCDIR)/lib/gui/gui_gtk.cc \
                    $(MAINSRCDIR)/lib/newmat/include.h \
                    $(MAINSRCDIR)/lib/newmat/newmat.h \
                    $(MAINSRCDIR)/lib/newmat/newmatap.h \
-                   $(MAINSRCDIR)/lib/newmatio.h
+                   $(MAINSRCDIR)/lib/newmatio.h \
+                   $(MAINSRCDIR)/lib/gui/gui_gtk.cc
Index: /orxonox/trunk/src/subprojects/collision_detection/Makefile.in
===================================================================
--- /orxonox/trunk/src/subprojects/collision_detection/Makefile.in	(revision 4625)
+++ /orxonox/trunk/src/subprojects/collision_detection/Makefile.in	(revision 4626)
@@ -256,9 +256,9 @@
                    $(MAINSRCDIR)/lib/coord/p_node.cc \
                    $(MAINSRCDIR)/lib/coord/null_parent.cc \
-                   $(MAINSRCDIR)/lib/gui/gui_gtk.cc \
                    $(MAINSRCDIR)/lib/newmat/include.h \
                    $(MAINSRCDIR)/lib/newmat/newmat.h \
                    $(MAINSRCDIR)/lib/newmat/newmatap.h \
-                   $(MAINSRCDIR)/lib/newmatio.h
+                   $(MAINSRCDIR)/lib/newmatio.h \
+                   $(MAINSRCDIR)/lib/gui/gui_gtk.cc
 
 all: all-am
Index: /orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
===================================================================
--- /orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc	(revision 4625)
+++ /orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc	(revision 4626)
@@ -35,5 +35,6 @@
   model = new MD2Model("models/tris.md2", "models/tris.pcx");
   model->tick(0.1f);
-  CDEngine::getInstance()->debugSpawnTree(1, model->data->pVertices, model->data->numVertices);
+  CDEngine::getInstance()->debugSpawnTree(10, model->data->pVertices, model->data->numVertices);
+
 
   LightManager* lightMan = LightManager::getInstance();
@@ -87,13 +88,13 @@
 void Framework::moduleInitGui(int argc, char** argv)
 {
-//   Window* guiMainWindow = NULL;
-//
-//   initGUI(0, NULL);
-//
-//   guiMainWindow = new Window("Collision_detection");
-//   {
-//     // all the Widgets you need
-//   }
-//   Window::mainWindow->showall();
-//   Window::mainWindow->setSize(300, 500);
+  Window* guiMainWindow = NULL;
+
+  initGUI(0, NULL);
+
+  guiMainWindow = new Window("Collision_detection");
+  {
+    //all the Widgets you need
+  }
+  Window::mainWindow->showall();
+  Window::mainWindow->setSize(300, 500);
 }
