Index: /orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 4850)
+++ /orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 4851)
@@ -17,4 +17,6 @@
 
 #include "quadtree_node.h"
+#include "list.h"
+#include "vector.h"
 
 using namespace std;
@@ -36,8 +38,16 @@
 {
   this->pModelInfo = pModelInfo;
-  this->getDimension(this->pModelInfo);
+  this->pDimension = this->getDimension(this->pModelInfo);
+  
+  /* create an array of triangle references */
+  this->pTriangles = new sTriangleExt*[this->pModelInfo->numTriangles];
+  this->numTriangles = this->pModelInfo->numTriangles;
+  this->pVertices = this->pModelInfo->pVertices;
+  for( int i = 0; i < this->pModelInfo->numTriangles; ++i)
+    this->pTriangles[i] = &this->pModelInfo->pTriangles[i];
+  
 }
 
-
+ 
 /**
  *  standard deconstructor
@@ -63,4 +73,31 @@
 void QuadtreeNode::separateNode(float minLength)
 {}
+
+
+/**
+ *  gives the signal to separate the model into a quadtree
+ * @param treeDepth the max depth, the steps to go if treeDept == 0 leaf reached
+*/
+void QuadtreeNode::separateNode()
+{
+  tList<sTriangleExt*>*           listA = new tList<sTriangleExt*>();    //!< triangle list of nodeA
+  tList<sTriangleExt*>*           listB = new tList<sTriangleExt*>();    //!< triangle list of nodeB
+  tList<sTriangleExt*>*           listC = new tList<sTriangleExt*>();    //!< triangle list of nodeC
+  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
+
+  rectCenter = this->pDimension->getCenter();
+  for( int i = 0; i < this->numTriangles; ++i)
+    {
+      for( int j = 0; j < 3; ++j)
+	{
+	  pVert = &this->pVertices[this->pTriangles[i]->indexToVertices[j]];
+	  if(  pVert[0] > rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset)
+	    printf("");
+
+	}
+    }
+}
 
 
Index: /orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h
===================================================================
--- /orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h	(revision 4850)
+++ /orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h	(revision 4851)
@@ -26,4 +26,5 @@
     void separateNode(int treeDepth);
     void separateNode(float minLength);
+    void separateNode();
 
     void drawTree(int depth, int drawMode) const;
@@ -38,8 +39,11 @@
     float                           axisLength;         //!< axis length of the quadtree
     float                           maxHeigth;          //!< max height of the model in the quadtree
+    float                           offset;             //!< offset of the actual quadtree rectangle
 
-    sTriangleExt*                   triangles;          //!< reference to the triangles of the node
+    sTriangleExt**                  pTriangles;         //!< reference to the triangles of the node
+    const float*                    pVertices;          //!< reference to vertices data
     unsigned int                    numTriangles;       //!< number of triangles of the Node
     modelInfo*                      pModelInfo;         //!< reference to the modelInfo of the object
+    Rectangle*                      pDimension;         //!< pointer to the local rectangle properties
 
     QuadtreeNode*                   nodeA;              //!< reference to the node A
Index: /orxonox/trunk/src/lib/math/vector.h
===================================================================
--- /orxonox/trunk/src/lib/math/vector.h	(revision 4850)
+++ /orxonox/trunk/src/lib/math/vector.h	(revision 4851)
@@ -245,13 +245,13 @@
 
   public:
-    Rectangle() {}
+    Rectangle() { this->center = new Vector(); }
     virtual ~Rectangle() {}
 
     /** \brief sets the center of the rectangle to a defined vector @param center the new center */
-   inline void setCenter(const Vector &center) { this->center = center;}
+   inline void setCenter(const Vector &center) { *this->center = center;}
     /** \brief sets the center of the rectangle to a defined vector @param x coord of the center @param y coord of the center @param z coord of the center */
-   inline void setCenter(float x, float y, float z) { this->center.x = x; this->center.y = y; this->center.z = z; }
+   inline void setCenter(float x, float y, float z) { this->center->x = x; this->center->y = y; this->center->z = z; }
    /** \brief returns the center of the rectangle to a defined vector @returns center the new center */
-   inline const Vector* getCenter() const { return &this->center; }
+   inline const Vector* getCenter() const { return this->center; }
 
    /** \brief sets both axis of the rectangle to a defined vector @param unityLength the new center */
@@ -261,6 +261,8 @@
 
   private:
-    Vector center;
-    float axis[2];
-};
+    Vector*         center;
+    float           axis[2];
+};
+
+
 #endif /* _VECTOR_H */
