Index: trunk/src/lib/graphics/spatial_separation/quadtree.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/quadtree.cc	(revision 5160)
+++ trunk/src/lib/graphics/spatial_separation/quadtree.cc	(revision 5215)
@@ -53,8 +53,8 @@
   /* make an array with access to the leafs of the Quad-Tree */
   this->nodes = new QuadtreeNode*[(int)pow(4, treeDepth)];
-  int* index = new int; *index = 0;
+  int index = 0; //new int; *index = 0; // !!changed by bensch!!
   for(int i = 0; i < (int)pow(2, treeDepth); ++i)
   {
-    this->rootNode->buildHashTable(this->nodes, index);
+    this->rootNode->buildHashTable(this->nodes, &index);
   }
   /* sort and revert the hash table to fit the right position */
@@ -65,7 +65,7 @@
   this->quadLength = this->nodes[0]->getDimension()->getAxis() * 2.0f;
   Rectangle* r = this->rootNode->getDimension();
-  Vector* offset = new Vector();
-  float xOff = r->getCenter()->x - r->getAxis();
-  float yOff = r->getCenter()->z - r->getAxis();
+  //  Vector* offset = new Vector(); // unused removed by bensch
+  float xOff = r->getCenter().x - r->getAxis();
+  float yOff = r->getCenter().z - r->getAxis();
   this->offset = new Vector();
   this->offset->x = xOff;
@@ -136,6 +136,6 @@
       for( int k = j + 1; k < len; ++k)
       {
-        a = this->nodes[i * len + j]->getDimension()->getCenter()->z;
-        b = this->nodes[i * len + k]->getDimension()->getCenter()->z;
+        a = this->nodes[i * len + j]->getDimension()->getCenter().z;
+        b = this->nodes[i * len + k]->getDimension()->getCenter().z;
 
         if( b > a)
Index: trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 5160)
+++ trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 5215)
@@ -57,5 +57,5 @@
     PRINT(3)(" |");
   PRINT(3)(" | +-| (II) Rectangle Center (%5.2f, %5.2f), half axis length: %5.2f\n",
-  this->pDimension->getCenter()->x, this->pDimension->getCenter()->z, this->pDimension->getAxis());
+  this->pDimension->getCenter().x, this->pDimension->getCenter().z, this->pDimension->getAxis());
 
   this->init();
@@ -205,5 +205,5 @@
   tList<sTriangleExt*>*           listD = new tList<sTriangleExt*>();    //!< triangle list of nodeD
   const float*                    pVert;                                 //!< pointer to the vertices
-  const Vector*                   rectCenter;                            //!< vector to the center of the rect
+  Vector                          rectCenter;                            //!< vector to the center of the rect
 
   rectCenter = this->pDimension->getCenter();
@@ -213,11 +213,11 @@
     {
       pVert = &this->pVertices[this->pTriangles[i]->indexToVertices[j]];
-      if( pVert[0] > rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset)
+      if( pVert[0] > rectCenter.x + this->offset && pVert[2] > rectCenter.z + this->offset)
         listA->add(&this->pTriangles[i]);
-      if( pVert[0] < rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset)
+      if( pVert[0] < rectCenter.x + this->offset && pVert[2] > rectCenter.z + this->offset)
         listB->add(&this->pTriangles[i]);
-      if( pVert[0] < rectCenter->x + this->offset && pVert[2] < rectCenter->z + this->offset)
+      if( pVert[0] < rectCenter.x + this->offset && pVert[2] < rectCenter.z + this->offset)
         listC->add(&this->pTriangles[i]);
-      if( pVert[0] > rectCenter->x + this->offset && pVert[2] < rectCenter->z + this->offset)
+      if( pVert[0] > rectCenter.x + this->offset && pVert[2] < rectCenter.z + this->offset)
         listD->add(&this->pTriangles[i]);
     }
@@ -304,13 +304,13 @@
 
 
-  v.x = this->pDimension->getCenter()->x + this->pDimension->getAxis() / 2.0f;
+  v.x = this->pDimension->getCenter().x + this->pDimension->getAxis() / 2.0f;
   v.y = 0.0;
-  v.z = this->pDimension->getCenter()->z + this->pDimension->getAxis() / 2.0f;
+  v.z = this->pDimension->getCenter().z + this->pDimension->getAxis() / 2.0f;
   rA = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
-  v.z = this->pDimension->getCenter()->z - this->pDimension->getAxis() / 2.0f;
+  v.z = this->pDimension->getCenter().z - this->pDimension->getAxis() / 2.0f;
   rB = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
-  v.x = this->pDimension->getCenter()->x - this->pDimension->getAxis() / 2.0f;
+  v.x = this->pDimension->getCenter().x - this->pDimension->getAxis() / 2.0f;
   rC = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
-  v.z = this->pDimension->getCenter()->z + this->pDimension->getAxis() / 2.0f;
+  v.z = this->pDimension->getCenter().z + this->pDimension->getAxis() / 2.0f;
   rD = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
 
@@ -371,5 +371,5 @@
   for( int i = 0; i < this->treeDepth; ++i)
     PRINT(3)(" |");
-  PRINT(3)(" | +-| (II) Rectangle Dimension  (%5.2f, %5.2f) to (%5.2f, %5.2f), Center (%5.2f, %5.2f)\n", minX, minY, maxX, maxY, rect->getCenter()->x, rect->getCenter()->z, rect->getAxis());
+  PRINT(3)(" | +-| (II) Rectangle Dimension  (%5.2f, %5.2f) to (%5.2f, %5.2f), Center (%5.2f, %5.2f)\n", minX, minY, maxX, maxY, rect->getCenter().x, rect->getCenter().z, rect->getAxis());
   return rect;
 }
@@ -383,5 +383,5 @@
 bool QuadtreeNode::includesPoint(const Vector& v) const
 {
-  Vector center = *this->pDimension->getCenter();
+  Vector center = this->pDimension->getCenter();
   float ax = this->pDimension->getAxis();
 
@@ -492,5 +492,5 @@
   if( this->treeDepth == this->maxDepth)
   {
-    Vector t1 = *this->pDimension->getCenter();
+    Vector t1 = this->pDimension->getCenter();
     float ax = this->pDimension->getAxis();
     float h = 50.0f;
@@ -525,5 +525,5 @@
     return;
 
-  Vector t1 = *this->pDimension->getCenter();
+  Vector t1 = this->pDimension->getCenter();
   float ax = this->pDimension->getAxis();
   float h = 70.0f;
