Index: orxonox/trunk/src/lib/collision_detection/bounding_volume.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bounding_volume.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/bounding_volume.h	(revision 4635)
@@ -27,7 +27,6 @@
     virtual void mergeWith(const BoundingVolume &bv) = NULL;
 
-    virtual void drawBV(int currentDepth, const int depth) const = NULL;
-    virtual void drawBVPolygon(int currentDepth, const int depth) const = NULL;
-    virtual void drawBVBlended(int currentDepth, const int depth) const = NULL;
+    virtual void drawBV(int currentDepth, int drawMode) const = NULL;
+
 
 
Index: orxonox/trunk/src/lib/collision_detection/bv_tree.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bv_tree.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/bv_tree.h	(revision 4635)
@@ -15,4 +15,16 @@
 class BoundingVolume;
 
+typedef enum DrawMode
+{
+  DRAW_ALL               = 1<<0,
+  DRAW_SINGLE            = 1<<1,
+
+  DRAW_SEPARATING_PLANE  = 1<<2,
+  DRAW_BV_AXIS           = 1<<3,
+  DRAW_BV_BLENDED        = 1<<4,
+  DRAW_BV_POLYGON        = 1<<5,
+  DRAW_MODEL             = 1<<6
+};
+
 
 //! A class that represents a bounding volume tree
@@ -26,8 +38,5 @@
   virtual void flushTree() = NULL;
 
-
-  virtual void drawBV(int depth) const = NULL;
-  virtual void drawBVPolygon(int depth) const = NULL;
-  virtual void drawBVBlended(int depth) const = NULL;
+  virtual void drawBV(int depth, int drawMode) const = NULL;
 
  protected:
Index: orxonox/trunk/src/lib/collision_detection/bv_tree_node.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bv_tree_node.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/bv_tree_node.h	(revision 4635)
@@ -31,7 +31,5 @@
   virtual void collideWith(const BVTree &tree) = NULL;
 
-  virtual void drawBV(int depth) const = NULL;
-  virtual void drawBVPolygon(int depth) const = NULL;
-  virtual void drawBVBlended(int depth) const = NULL;
+  virtual void drawBV(int depth, int drawMode) const = NULL;
 
 
Index: orxonox/trunk/src/lib/collision_detection/cd_engine.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/cd_engine.cc	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/cd_engine.cc	(revision 4635)
@@ -53,17 +53,11 @@
 
 
-void CDEngine::drawBV(int depth) const
+void CDEngine::drawBV(int depth, int drawMode) const
 {
   /* this would operate on  worldList bases, for testing purposes, we only use one OBBTree */
-  this->rootTree->drawBV(depth);
+  this->rootTree->drawBV(depth, drawMode);
 }
 
 
-void CDEngine::drawBVPolygon(int depth) const
-{}
-
-
-void CDEngine::drawBVBlended(int depth) const
-{}
 
 
Index: orxonox/trunk/src/lib/collision_detection/cd_engine.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/cd_engine.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/cd_engine.h	(revision 4635)
@@ -44,7 +44,5 @@
   void disable(const int options) { int temp = this->state & options; this->state ^= temp; }
 
-  void drawBV(int depth) const;
-  void drawBVPolygon(int depth) const;
-  void drawBVBlended(int depth) const;
+  void drawBV(int depth, int drawMode) const;
 
   void checkCollisions();
Index: orxonox/trunk/src/lib/collision_detection/obb.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb.cc	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/obb.cc	(revision 4635)
@@ -51,12 +51,6 @@
 
 
-void OBB::drawBV(int currentDepth, const int depth) const
+void OBB::drawBV(int currentDepth, int drawMode) const
 {}
 
 
-void OBB::drawBVPolygon(int currentDepth, const int depth) const
-{}
-
-
-void OBB::drawBVBlended(int currentDepth, const int depth) const
-{}
Index: orxonox/trunk/src/lib/collision_detection/obb.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/obb.h	(revision 4635)
@@ -26,7 +26,5 @@
   virtual void mergeWith(const BoundingVolume &bv);
 
-  virtual void drawBV(int currentDepth, const int depth) const;
-  virtual void drawBVPolygon(int currentDepth, const int depth) const;
-  virtual void drawBVBlended(int currentDepth, const int depth) const;
+  virtual void drawBV(int currentDepth, int drawMode) const;
 
 
Index: orxonox/trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4635)
@@ -77,26 +77,12 @@
 
 
-void OBBTree::drawBV(int depth) const
+void OBBTree::drawBV(int depth, int drawMode) const
 {
   if( likely(this->rootNode != NULL))
   {
-    this->rootNode->drawBV(depth);
-    this->rootNode->drawBVPolygon(depth);
+    this->rootNode->drawBV(depth, drawMode);
   }
 }
 
-
-void OBBTree::drawBVPolygon(int depth) const
-{
-  if( likely(this->rootNode != NULL))
-    this->rootNode->drawBVPolygon(depth);
-}
-
-
-void OBBTree::drawBVBlended(int depth) const
-{
-  if( likely(this->rootNode != NULL))
-    this->rootNode->drawBVBlended(depth);
-}
 
 
Index: orxonox/trunk/src/lib/collision_detection/obb_tree.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree.h	(revision 4635)
@@ -27,7 +27,5 @@
     void collideWith(const OBBTree &tree);
 
-    virtual void drawBV(int depth) const;
-    virtual void drawBVPolygon(int depth) const;
-    virtual void drawBVBlended(int depth) const;
+    virtual void drawBV(int depth, int drawMode) const;
 
     Material* getMaterial(unsigned int depth) { return material[depth%3]; }
Index: orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4635)
@@ -439,23 +439,23 @@
 
 
-void OBBTreeNode::drawBV(int depth) const
-{
-  glBegin(GL_TRIANGLES);
-  glColor3f(1.0, 1.0, 1.0);
-  for(int i = 0; i < this->bvElement->numOfVertices; ++i)
+void OBBTreeNode::drawBV(int depth, int drawMode) const
+{
+  //OBBTree::material->select();
+
+  this->obbTree->getMaterial(depth)->select();
+
+  /* draw the model itself, there is some problem concerning this: the vertices are drawn multiple times */
+  if( drawMode & DRAW_MODEL || drawMode & DRAW_ALL)
+  {
+    glBegin(GL_TRIANGLES);
+    glColor3f(1.0, 1.0, 1.0);
+    for(int i = 0; i < this->bvElement->numOfVertices; ++i)
     {
       glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
       //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
     }
-  glEnd();
-  //this->drawBVPolygon(depth);
-}
-
-
-void OBBTreeNode::drawBVPolygon(int depth) const
-{
-  //OBBTree::material->select();
-
-  this->obbTree->getMaterial(depth)->select();
+    glEnd();
+  }
+
 
   /* draw world axes */
@@ -473,118 +473,128 @@
 
 
-
-  /* draw the obb axes */
-//   glBegin(GL_LINES);
-//   glColor3f(0.0, 0.4, 0.3);
-//   glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
-//   glVertex3f(this->bvElement->center->x + this->bvElement->axis[0]->x * this->bvElement->halfLength[0],
-//              this->bvElement->center->y + this->bvElement->axis[0]->y * this->bvElement->halfLength[0],
-//              this->bvElement->center->z + this->bvElement->axis[0]->z * this->bvElement->halfLength[0]);
-//
-//   glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
-//   glVertex3f(this->bvElement->center->x + this->bvElement->axis[1]->x * this->bvElement->halfLength[1],
-//              this->bvElement->center->y + this->bvElement->axis[1]->y * this->bvElement->halfLength[1],
-//              this->bvElement->center->z + this->bvElement->axis[1]->z * this->bvElement->halfLength[1]);
-//
-//   glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
-//   glVertex3f(this->bvElement->center->x + this->bvElement->axis[2]->x * this->bvElement->halfLength[2],
-//              this->bvElement->center->y + this->bvElement->axis[2]->y * this->bvElement->halfLength[2],
-//              this->bvElement->center->z + this->bvElement->axis[2]->z * this->bvElement->halfLength[2]);
-//   glEnd();
-
-
-  Vector cen = *this->bvElement->center;
-  Vector** axis = this->bvElement->axis;
-  float* len = this->bvElement->halfLength;
-
-  /* draw bounding box */
-  glBegin(GL_LINE_LOOP);
-  glColor3f(0.3, 0.4, 0.7);
-  glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glEnd();
-
-  glBegin(GL_LINE_LOOP);
-  glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glEnd();
-
-  glBegin(GL_LINE_LOOP);
-  glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glEnd();
-
-  glBegin(GL_LINE_LOOP);
-  glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
-  glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
-             cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
-             cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
-  glEnd();
-
-
-  if( true)//depth != 0)
-  {
-    /* now draw the separation plane */
-    Vector a1 = *this->bvElement->axis[(this->longestAxisIndex + 1)%3];
-    Vector a2 = *this->bvElement->axis[(this->longestAxisIndex + 2)%3];
-    Vector c = *this->bvElement->center;
-    float l1 = this->bvElement->halfLength[(this->longestAxisIndex + 1)%3];
-    float l2 = this->bvElement->halfLength[(this->longestAxisIndex + 2)%3];
-    glBegin(GL_QUADS);
-    glVertex3f(c.x + a1.x * l1 + a2.x * l2, c.y + a1.y * l1+ a2.y * l2, c.z + a1.z * l1 + a2.z * l2);
-    glVertex3f(c.x - a1.x * l1 + a2.x * l2, c.y - a1.y * l1+ a2.y * l2, c.z - a1.z * l1 + a2.z * l2);
-    glVertex3f(c.x - a1.x * l1 - a2.x * l2, c.y - a1.y * l1- a2.y * l2, c.z - a1.z * l1 - a2.z * l2);
-    glVertex3f(c.x + a1.x * l1 - a2.x * l2, c.y + a1.y * l1- a2.y * l2, c.z + a1.z * l1 - a2.z * l2);
-    glEnd();
+  if( drawMode & DRAW_BV_AXIS || drawMode & DRAW_ALL)
+  {
+    if( drawMode & DRAW_SINGLE && depth == 0)
+    {
+      /* draw the obb axes */
+      glBegin(GL_LINES);
+      glColor3f(0.0, 0.4, 0.3);
+      glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
+      glVertex3f(this->bvElement->center->x + this->bvElement->axis[0]->x * this->bvElement->halfLength[0],
+                 this->bvElement->center->y + this->bvElement->axis[0]->y * this->bvElement->halfLength[0],
+                 this->bvElement->center->z + this->bvElement->axis[0]->z * this->bvElement->halfLength[0]);
+
+      glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
+      glVertex3f(this->bvElement->center->x + this->bvElement->axis[1]->x * this->bvElement->halfLength[1],
+                 this->bvElement->center->y + this->bvElement->axis[1]->y * this->bvElement->halfLength[1],
+                 this->bvElement->center->z + this->bvElement->axis[1]->z * this->bvElement->halfLength[1]);
+
+      glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);
+      glVertex3f(this->bvElement->center->x + this->bvElement->axis[2]->x * this->bvElement->halfLength[2],
+                 this->bvElement->center->y + this->bvElement->axis[2]->y * this->bvElement->halfLength[2],
+                 this->bvElement->center->z + this->bvElement->axis[2]->z * this->bvElement->halfLength[2]);
+      glEnd();
+    }
+  }
+
+
+  if( drawMode & DRAW_BV_POLYGON || drawMode & DRAW_ALL)
+  {
+    if( drawMode & DRAW_SINGLE && depth == 0)
+    {
+      Vector cen = *this->bvElement->center;
+      Vector** axis = this->bvElement->axis;
+      float* len = this->bvElement->halfLength;
+
+      /* draw bounding box */
+      glBegin(GL_LINE_LOOP);
+      glColor3f(0.3, 0.4, 0.7);
+      glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glEnd();
+
+      glBegin(GL_LINE_LOOP);
+      glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glVertex3f(cen.x + axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glEnd();
+
+      glBegin(GL_LINE_LOOP);
+      glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glVertex3f(cen.x - axis[0]->x * len[0] - axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] - axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] - axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glEnd();
+
+      glBegin(GL_LINE_LOOP);
+      glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glVertex3f(cen.x - axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y - axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z - axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] + axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] + axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] + axis[2]->z * len[2]);
+      glVertex3f(cen.x + axis[0]->x * len[0] + axis[1]->x * len[1] - axis[2]->x * len[2],
+                 cen.y + axis[0]->y * len[0] + axis[1]->y * len[1] - axis[2]->y * len[2],
+                 cen.z + axis[0]->z * len[0] + axis[1]->z * len[1] - axis[2]->z * len[2]);
+      glEnd();
+    }
+  }
+
+  if( drawMode & DRAW_SEPARATING_PLANE || drawMode & DRAW_ALL)
+  {
+    if( drawMode & DRAW_SINGLE && depth == 0)
+    {
+      /* now draw the separation plane */
+      Vector a1 = *this->bvElement->axis[(this->longestAxisIndex + 1)%3];
+      Vector a2 = *this->bvElement->axis[(this->longestAxisIndex + 2)%3];
+      Vector c = *this->bvElement->center;
+      float l1 = this->bvElement->halfLength[(this->longestAxisIndex + 1)%3];
+      float l2 = this->bvElement->halfLength[(this->longestAxisIndex + 2)%3];
+      glBegin(GL_QUADS);
+      glVertex3f(c.x + a1.x * l1 + a2.x * l2, c.y + a1.y * l1+ a2.y * l2, c.z + a1.z * l1 + a2.z * l2);
+      glVertex3f(c.x - a1.x * l1 + a2.x * l2, c.y - a1.y * l1+ a2.y * l2, c.z - a1.z * l1 + a2.z * l2);
+      glVertex3f(c.x - a1.x * l1 - a2.x * l2, c.y - a1.y * l1- a2.y * l2, c.z - a1.z * l1 - a2.z * l2);
+      glVertex3f(c.x + a1.x * l1 - a2.x * l2, c.y + a1.y * l1- a2.y * l2, c.z + a1.z * l1 - a2.z * l2);
+      glEnd();
+    }
   }
 
   if( this->nodeLeft != NULL && depth != 0 )
-    this->nodeLeft->drawBVPolygon(depth - 1);
+    this->nodeLeft->drawBV(depth - 1, drawMode);
   if( this->nodeRight != NULL && depth != 0)
-    this->nodeRight->drawBVPolygon(depth - 1);
-
-}
-
-
-void OBBTreeNode::drawBVBlended(int depth) const
-{}
+    this->nodeRight->drawBV(depth - 1, drawMode);
+
+}
+
 
 
Index: orxonox/trunk/src/lib/collision_detection/obb_tree_node.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree_node.h	(revision 4633)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree_node.h	(revision 4635)
@@ -35,7 +35,5 @@
     virtual void collideWith(const BVTree &tree);
 
-    virtual void drawBV(int depth) const;
-    virtual void drawBVPolygon(int depth) const;
-    virtual void drawBVBlended(int depth) const;
+    virtual void drawBV(int depth, int drawMode) const;
 
     void debug();
