Index: branches/cd/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- branches/cd/src/lib/collision_detection/obb_tree_node.cc	(revision 7582)
+++ branches/cd/src/lib/collision_detection/obb_tree_node.cc	(revision 7583)
@@ -299,18 +299,18 @@
   float               maxLength[3];                          //!< maximal lenth of the axis
   float               minLength[3];                          //!< minimal length of the axis
-  const sVec3D*       tmpVec;                                //!< variable taking tmp vectors
+  const float*       tmpVec;                                //!< variable taking tmp vectors
 
 
   /* get the maximal dimensions of the body in all directions */
   /* for the initialisation the value just has to be inside of the polygon soup -> first vertices (rand) */
-  tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
-  maxLength[0] = p0.distancePoint(*tmpVec);
-  minLength[0] = p0.distancePoint(*tmpVec);
+  tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
+  maxLength[0] = p0.distancePoint(tmpVec);
+  minLength[0] = p0.distancePoint(tmpVec);
   for( int j = 0; j < length; ++j)
   {
     for( int i = 0; i < 3; ++i)
     {
-      tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
-      tmpLength = p0.distancePoint(*tmpVec);
+      tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
+      tmpLength = p0.distancePoint(tmpVec);
       PRINTF(0)("point[%i][%i]: %f, %f, %f with distance to plane: %f\n", j, i, tmpVec[0], tmpVec[1], tmpVec[2], tmpLength);
       if( tmpLength > maxLength[0])
@@ -322,13 +322,13 @@
 
   /* for the initialisation the value just has to be inside of the polygon soup -> first vertices (rand) */
-  tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
-  maxLength[1] = p1.distancePoint(*tmpVec);
-  minLength[1] = p1.distancePoint(*tmpVec);
+  tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
+  maxLength[1] = p1.distancePoint(tmpVec);
+  minLength[1] = p1.distancePoint(tmpVec);
   for( int j = 0; j < length; ++j)
   {
     for( int i = 0; i < 3; ++i)
     {
-      tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
-      tmpLength = p1.distancePoint(*tmpVec);
+      tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
+      tmpLength = p1.distancePoint(tmpVec);
       if( tmpLength > maxLength[1])
         maxLength[1] = tmpLength;
@@ -339,13 +339,13 @@
 
   /* for the initialisation the value just has to be inside of the polygon soup -> first vertices (rand) */
-  tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
-  maxLength[2] = p2.distancePoint(*tmpVec);
-  minLength[2] = p2.distancePoint(*tmpVec);
+  tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
+  maxLength[2] = p2.distancePoint(tmpVec);
+  minLength[2] = p2.distancePoint(tmpVec);
   for( int j = 0; j < length; ++j)
   {
     for( int i = 0; i < 3; ++i)
     {
-      tmpVec = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
-      tmpLength = p2.distancePoint(*tmpVec);
+      tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
+      tmpLength = p2.distancePoint(tmpVec);
       if( tmpLength > maxLength[2])
         maxLength[2] = tmpLength;
@@ -362,5 +362,5 @@
   {
     centerOffset[i] = (fabs(maxLength[i]) - fabs(minLength[i])) / 2.0f;       // min length is negatie
-    box.halfLength[i] = (maxLength[i] - minLength[i]) / 3.0f;                 // min length is negative
+    box.halfLength[i] = (maxLength[i] - minLength[i]) / 2.0f;                 // min length is negative
   }
   // FIXME: += anstatt -= ????????? verwirr
Index: branches/cd/src/lib/math/plane.cc
===================================================================
--- branches/cd/src/lib/math/plane.cc	(revision 7582)
+++ branches/cd/src/lib/math/plane.cc	(revision 7583)
@@ -222,4 +222,5 @@
 }
 
+
 /**
  *  calculate the two points of minimal distance of two lines
@@ -324,5 +325,19 @@
  * @return the distance between the plane and the point (can be negative)
  */
-float Plane::distancePoint (const sVec3D& p) const
+// float Plane::distancePoint (const sVec3D& p) const
+// {
+//   Vector s(p[0], p[1], p[2]);
+//   float l = n.len();
+//   if( l == 0.0) return 0.0;
+//   return (n.dot(s) + k) / n.len();
+// }
+
+
+/**
+ *  returns the distance between the plane and a point
+ * @param p: a Point
+ * @return the distance between the plane and the point (can be negative)
+ */
+float Plane::distancePoint (const float* p) const
 {
   Vector s(p[0], p[1], p[2]);
Index: branches/cd/src/lib/math/plane.h
===================================================================
--- branches/cd/src/lib/math/plane.h	(revision 7582)
+++ branches/cd/src/lib/math/plane.h	(revision 7583)
@@ -51,5 +51,6 @@
   Vector intersectLine (const Line& l) const;
   float distancePoint (const Vector& p) const;
-  float distancePoint (const sVec3D& p) const;
+//   float distancePoint (const sVec3D& p) const;
+  float distancePoint (const float* p) const;
   float locatePoint (const Vector& p) const;
 };
