Index: orxonox/trunk/src/collision.cc
===================================================================
--- orxonox/trunk/src/collision.cc	(revision 2190)
+++ orxonox/trunk/src/collision.cc	(revision 3231)
@@ -28,5 +28,5 @@
 CollisionCluster::CollisionCluster (float rad = 1.0, Vector mid = Vector(0,0,0))
 {
-  root = (CC_Tree*) malloc( sizeof( CC_Tree));
+  root = (CCTree*) malloc( sizeof( CCTree));
   root->n = 0;
   root->data.ID = 0;
@@ -62,5 +62,5 @@
   }
   
-  root = load_CC_Tree (stream);
+  root = loadCCTree (stream);
   fclose (stream);
 }
@@ -71,5 +71,5 @@
 CollisionCluster::~CollisionCluster ()
 {
-  free_CC_Tree( root);
+  freeCCTree(root);
 }
 
@@ -85,5 +85,5 @@
   stream = fopen( filename, "wb");
   if( stream == NULL) return -1;
-  r = save_CC_Tree (root, stream);
+  r = saveCCTree(root, stream);
   fclose (stream);
   return r;
@@ -99,10 +99,10 @@
    \return true on collision, false otherwise. If true is returned, the flag in ahitflags that symbolises the hit subsphere is set, and impactpoint is set to the Location where the intersection occured
 */
-bool check_trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
-{
-	CC_Tree* t;
+bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
+{
+	CCTree* t;
 	if( (t = a->root) == NULL) return false;
 	
-  return cctree_trace( pa, t, ahitflags, trace, impactpoint);
+  return cctreeTrace( pa, t, ahitflags, trace, impactpoint);
 }
 
@@ -118,11 +118,11 @@
    If true is returned, all flags in ahitflags and bhitflags that symbolize intersecting subspheres in the respective CollisionCluster are set
 */
-bool check_collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)
-{
-  CC_Tree* ta, *tb;
+bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)
+{
+  CCTree* ta, *tb;
   if( (ta = a->root) == NULL) return false;
   if( (tb = b->root) == NULL) return false;
   
-  return cctree_iterate(pa, ta, ahitflags, pb, tb, bhitflags);
+  return cctreeIterate(pa, ta, ahitflags, pb, tb, bhitflags);
 }
 
@@ -135,5 +135,5 @@
    \return true on intersection, false otherwise
 */
-bool sphere_sphere_collision( Vector m1, float r1, Vector m2, float r2)
+bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2)
 {
   if ((m1-m2).len() < r1+r2) return true;
@@ -149,5 +149,5 @@
    \return true on intersection, false otherwise. If true is returned, impactpoint is set to the loaction where the intersection occured
 */
-bool trace_sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint)
+bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint)
 {
   float A, B, C, D, t[2];
@@ -176,5 +176,5 @@
 }
 
-bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags)
+bool cctreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags)
 {
   bool r = false;
@@ -182,9 +182,9 @@
   Vector mra = pa->r + pa->w.apply(ta->m);
   Vector mrb = pb->r + pb->w.apply(tb->m);
-  CC_Tree* use_a, *use_b;
-  
-  if( use_a == NULL || use_b == NULL) return false;
-  
-  if( sphere_sphere_collision( mra, ta->r, mrb, tb->r))
+  CCTree* useA, *useB;
+  
+  if( useA == NULL || useB == NULL) return false;
+  
+  if( sphereSphereCollision( mra, ta->r, mrb, tb->r))
   {
     if( ta->n == 0 && tb->n == 0)
@@ -196,12 +196,12 @@
     for( ia = 0; ia < ta->n || ta->n == 0; ia++)
     {
-      if( ta->n == 0) use_a = ta;
-      else use_a = ta->data.b[ia];
+      if( ta->n == 0) useA = ta;
+      else useA = ta->data.b[ia];
       for( ib = 0; ib < tb->n || ta->n == 0; ib++)
       {
-        if( ta->n == 0) use_b = ta;
-        else use_b = ta->data.b[ib];
+        if( ta->n == 0) useB = ta;
+        else useB = ta->data.b[ib];
         
-        r = r || cctree_iterate( pa, use_a, ahitflags, pb, use_b, bhitflags);
+        r = r || cctreeIterate( pa, useA, ahitflags, pb, useB, bhitflags);
         
         if( tb->n == 0) break;
@@ -233,12 +233,12 @@
 
 /**
-   \brief frees the memory allocated in a CC_Tree
-*/
-void free_CC_Tree( CC_Tree* tree)
+   \brief frees the memory allocated in a CCTree
+*/
+void freeCCTree( CCTree* tree)
 {
   if (tree == NULL) return;
   for (int i = 0; i < tree->n; i++)
   {
-    free_CC_Tree( tree->data.b[i]);
+    freeCCTree(tree->data.b[i]);
   }
   free( tree);
@@ -246,10 +246,10 @@
 
 /**
-   \brief loads a CC_Tree from a stream
-*/
-CC_Tree* load_CC_Tree (FILE* stream)
-{
-  CC_Tree* tree = NULL;
-  CC_Tree** branches = NULL;
+   \brief loads a CCTree from a stream
+*/
+CCTree* loadCCTree (FILE* stream)
+{
+  CCTree* tree = NULL;
+  CCTree** branches = NULL;
   float buf[4];
   unsigned long n;
@@ -267,13 +267,13 @@
   else
   {
-    branches = (CC_Tree**)malloc( sizeof(CC_Tree*) * n);
+    branches = (CCTree**)malloc( sizeof(CCTree*) * n);
     for( int i = 0; i < n; i++)
     {
-      if ((branches[i] = load_CC_Tree (stream)) == NULL)
+      if ((branches[i] = loadCCTree (stream)) == NULL)
       {
         for( int j = 0; j < i; j++)
         {
-          free_CC_Tree (branches[j]);
-          free (branches);
+          freeCCTree (branches[j]);
+          free(branches);
           return NULL;
         }
@@ -283,5 +283,5 @@
   
   // assemble
-  tree = (CC_Tree*) malloc (sizeof(CC_Tree));
+  tree = (CCTree*) malloc (sizeof(CCTree));
   tree->m.x = buf[0];
   tree->m.y = buf[1];
@@ -297,7 +297,7 @@
 
 /**
-   \brief saves a CC_Tree to a stream
-*/
-int save_CC_Tree (CC_Tree* tree, FILE* stream)
+   \brief saves a CCTree to a stream
+*/
+int saveCCTree (CCTree* tree, FILE* stream)
 {
   float buf[4];
@@ -321,5 +321,5 @@
     for( int i = 0; i < tree->n; i++)
     {
-      if ( save_CC_Tree (tree->data.b[i], stream) == -1) return -1;
+      if ( saveCCTree (tree->data.b[i], stream) == -1) return -1;
     }
   }
@@ -329,14 +329,14 @@
 }
 
-bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
+bool cctreetrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
 {
   bool r = false;
   int i;
   Vector mr = p->r + p->w.apply (t->m);
-  CC_Tree* use_t;
+  CCTree* useT;
   Vector* ips;
   unsigned long* hfs;
   
-  if( trace_sphere_collision (mr, t->r, trace, impactpoint))
+  if( traceSphereCollision (mr, t->r, trace, impactpoint))
   {
   	if( t->n == 0)
@@ -352,5 +352,5 @@
   		for (i = 0; i < t->n; i++)
   		{
-  			r = r || cctree_trace (p, t->data.b[i], &(hfs[i]), trace, &(ips[i]));
+  			r = r || cctreeTrace (p, t->data.b[i], &(hfs[i]), trace, &(ips[i]));
   		}
   		if( r)
