Index: /orxonox/trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- /orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4681)
+++ /orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4682)
@@ -31,4 +31,17 @@
 OBBTree::OBBTree ()
 {
+  this->init();
+}
+
+OBBTree::OBBTree(int depth, sVec3D *verticesList, const int length)
+{
+  this->init();
+  this->spawnBVTree(depth, verticesList, length);
+}
+
+
+
+void OBBTree::init()
+{
   this->setClassID(CL_OBB_TREE, "OBBTree");
 
@@ -61,5 +74,4 @@
   this->id = 0;
 }
-
 
 /**
Index: /orxonox/trunk/src/lib/collision_detection/obb_tree.h
===================================================================
--- /orxonox/trunk/src/lib/collision_detection/obb_tree.h	(revision 4681)
+++ /orxonox/trunk/src/lib/collision_detection/obb_tree.h	(revision 4682)
@@ -20,5 +20,7 @@
   public:
     OBBTree();
+    OBBTree(int depth, sVec3D *verticesList, const int length);
     virtual ~OBBTree();
+    void init();
 
     virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length);
Index: /orxonox/trunk/src/lib/graphics/importer/md2Model.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/md2Model.cc	(revision 4681)
+++ /orxonox/trunk/src/lib/graphics/importer/md2Model.cc	(revision 4682)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -25,5 +25,5 @@
 using namespace std;
 
-//! the model anorms 
+//! the model anorms
 sVec3D MD2Model::anorms[NUM_VERTEX_NORMALS] = {
  #include "anorms.h"
@@ -38,5 +38,5 @@
 static float *shadeDots = MD2Model::anormsDots[0];
 
-//! the angle under which the model is viewd, used internaly 
+//! the angle under which the model is viewd, used internaly
 float md2Angle = 0.0f;
 
@@ -45,5 +45,5 @@
 sAnim MD2Model::animationList[21] =
   {
- // begin, end, fps 
+ // begin, end, fps
     {   0,  39,  9 },   //!< STAND
     {  40,  45, 10 },   //!< RUN
@@ -115,7 +115,7 @@
   for(int i = 0; i < this->data->numFrames; ++i)
     {
-      verticesList[i][0] = (currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0])) * this->scaleFactor;
-      verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1])) * this->scaleFactor;
-      verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2])) * this->scaleFactor;
+      verticesList[i][0] = (currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]));
+      verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]));
+      verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]));
     }
 }
@@ -138,5 +138,5 @@
   this->animationState.fps = animationList[type].fps;
   this->animationState.type = type;
-  
+
   this->animationState.interpolationState = 0.0;
   this->animationState.localTime = 0.0;
@@ -169,5 +169,5 @@
 
   glPopMatrix();
-} 
+}
 
 
@@ -185,5 +185,5 @@
   glEnable(GL_CULL_FACE);
   glCullFace(GL_BACK);
-     
+
   this->processLighting();
   this->interpolate(verticesList);
@@ -194,19 +194,19 @@
     {
       if( i < 0)
-	{
-	  glBegin(GL_TRIANGLE_FAN);
-	  i = -i;
-	}
+        {
+          glBegin(GL_TRIANGLE_FAN);
+          i = -i;
+        }
       else
-	{
-	  glBegin(GL_TRIANGLE_STRIP);
-	}
+        {
+          glBegin(GL_TRIANGLE_STRIP);
+        }
 
       for(; i > 0; i--, pCommands += 3) /* down counting for loop, next 3 gl commands */
-	{
-	  glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]);
-	  glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] );
-	  glVertex3fv(verticesList[pCommands[2]]);
-	}
+        {
+          glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]);
+          glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] );
+          glVertex3fv(verticesList[pCommands[2]]);
+        }
       glEnd();
     }
@@ -227,7 +227,7 @@
       this->animationState.currentFrame = this->animationState.nextFrame;
       this->animationState.nextFrame++;
-      
+
       if( this->animationState.nextFrame > this->animationState.endFrame)
-	this->animationState.nextFrame = this->animationState.startFrame;
+        this->animationState.nextFrame = this->animationState.startFrame;
       this->animationState.lastTime = this->animationState.localTime;
     }
@@ -238,5 +238,5 @@
     this->animationState.nextFrame = 0;
 
-  this->animationState.interpolationState = this->animationState.fps * 
+  this->animationState.interpolationState = this->animationState.fps *
     (this->animationState.localTime - this->animationState.lastTime);
 }
@@ -282,11 +282,11 @@
   this->pVertices = NULL;
   this->pGLCommands = NULL;
-  this->pLightNormals = NULL; 
+  this->pLightNormals = NULL;
 
   this->numFrames = 0;
   this->numVertices = 0;
   this->numGLCommands = 0;
-  
-  this->scaleFactor = 1.0f;
+
+  this->scaleFactor = 0.2f;
 
   this->loadModel(modelFileName);
@@ -328,5 +328,5 @@
 
   pFile = fopen(fileName, "rb");
-  if( unlikely(!pFile)) 
+  if( unlikely(!pFile))
     {
       PRINTF(1)("Couldn't open the MD2 File for loading. Exiting.\n");
@@ -364,17 +364,17 @@
   for(int i = 0; i < this->numFrames; ++i)
     {
-      frame = (sFrame*)(buffer + this->header->frameSize * i); 
+      frame = (sFrame*)(buffer + this->header->frameSize * i);
       pVertex = this->pVertices + this->numVertices  * i;
       pNormals = this->pLightNormals + this->numVertices * i;
 
       for(int j = 0; j < this->numVertices; ++j)
-	{
-	  /* SPEEDUP: *(pVerts + i + 0) = (*(frame->pVertices + i + 0)...  */
-	  pVertex[j][0] = (frame->pVertices[j].v[0] * frame->scale[0]) + frame->translate[0];
-	  pVertex[j][1] = (frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2];
-	  pVertex[j][2] = -1.0 * (frame->pVertices[j].v[1] * frame->scale[1] + frame->translate[1]);
-	  
-	  pNormals[j] = frame->pVertices[j].lightNormalIndex;
-	}
+        {
+          /* SPEEDUP: *(pVerts + i + 0) = (*(frame->pVertices + i + 0)...  */
+          pVertex[j][0] = ((frame->pVertices[j].v[0] * frame->scale[0] ) + frame->translate[0] )* this->scaleFactor;
+          pVertex[j][1] = ((frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2]) * this->scaleFactor;
+          pVertex[j][2] = (-1.0 * (frame->pVertices[j].v[1] * frame->scale[1] + frame->translate[1])) * this->scaleFactor;
+
+          pNormals[j] = frame->pVertices[j].lightNormalIndex;
+        }
     }
 
Index: /orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
===================================================================
--- /orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc	(revision 4681)
+++ /orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc	(revision 4682)
@@ -241,4 +241,5 @@
   {
     entity->draw();
+    entity->drawBVTree(depth, drawMode);
     entity = iterator->nextElement();       /* give back the next element or NULL if last */
   }
Index: /orxonox/trunk/src/world_entities/environment.cc
===================================================================
--- /orxonox/trunk/src/world_entities/environment.cc	(revision 4681)
+++ /orxonox/trunk/src/world_entities/environment.cc	(revision 4682)
@@ -22,4 +22,5 @@
 #include "vector.h"
 #include "objModel.h"
+#include "obb_tree.h"
 
 using namespace std;
@@ -33,4 +34,6 @@
   this->setClassID(CL_ENVIRONMENT, "Environment");
   this->model = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN);
+
+  this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
 }
 
Index: /orxonox/trunk/src/world_entities/test_entity.cc
===================================================================
--- /orxonox/trunk/src/world_entities/test_entity.cc	(revision 4681)
+++ /orxonox/trunk/src/world_entities/test_entity.cc	(revision 4682)
@@ -21,4 +21,5 @@
 #include "model.h"
 #include "md2Model.h"
+#include "obb_tree.h"
 
 using namespace std;
@@ -31,4 +32,5 @@
 
   this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx");
+  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
   this->md2Model->debug();
 }
@@ -72,5 +74,4 @@
   this->getAbsDir().matrix (matrix);
   glMultMatrixf((float*)matrix);
-  glScalef(0.2, 0.2, 0.2);
   this->md2Model->draw();
 
Index: /orxonox/trunk/src/world_entities/world_entity.cc
===================================================================
--- /orxonox/trunk/src/world_entities/world_entity.cc	(revision 4681)
+++ /orxonox/trunk/src/world_entities/world_entity.cc	(revision 4682)
@@ -21,4 +21,5 @@
 #include "list.h"
 #include "vector.h"
+#include "obb_tree.h"
 
 using namespace std;
@@ -32,4 +33,5 @@
 
   this->model = NULL;
+  this->obbTree = NULL;
 
   if (root)
Index: /orxonox/trunk/src/world_entities/world_entity.h
===================================================================
--- /orxonox/trunk/src/world_entities/world_entity.h	(revision 4681)
+++ /orxonox/trunk/src/world_entities/world_entity.h	(revision 4682)
@@ -12,11 +12,14 @@
 #include "factory.h"
 #include "load_param.h"
+#include "bv_tree.h"
 #include "model.h"
 
-//class CollisionCluster;
+
+
 class CharacterAttributes;
 class SoundEngine;
 class SoundBuffer;
 class SoundSource;
+
 
 //! Basic class from which all interactive stuff in the world is derived from
@@ -52,9 +55,11 @@
   void processDraw ();
   virtual void draw ();
+  inline void drawBVTree(int depth, int drawMode) { this->obbTree->drawBV(depth, drawMode); }
   virtual void tick (float time);
 
  protected:
-  Model* model;                  //!< The model that should be loaded for this entity.
+  Model* model;                       //!< The model that should be loaded for this entity.
   CharacterAttributes* charAttr;      //!< the character attributes of a world_entity
+  BVTree*             obbTree;       //!< this is the obb tree reference needed for collision detection
 
  private:
