Index: trunk/src/lib/graphics/importer/primitive_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/primitive_model.cc	(revision 6912)
+++ trunk/src/lib/graphics/importer/primitive_model.cc	(revision 7729)
@@ -34,5 +34,5 @@
 {
   switch (type)
-    {
+  {
     default:
     case PRIM_CUBE:
@@ -51,5 +51,5 @@
       this->planeModel(size, detail);
       break;
-    }
+  }
   this->finalize();
 }
@@ -79,21 +79,21 @@
   // defining the Vertices
   for (float i = 0; i < df *2.0; i+=1.0)
-    {
-      float vi = i/df * PI;
-      for (float j = -df / 2.0 +1.0; j <= df / 2.0; j+=1.0 *df/(df+1.0))
-        {
-          float vj = j/df *PI;
-          this->addVertexNormal(cos(vi) * cos(vj),
-                                sin(vj),
-                                sin(vi) * cos(vj));
-
-          this->addVertex(size * cos(vi) * cos(vj),
-                          size * sin(vj),
-                          size * sin(vi) * cos(vj));
-
-          this->addVertexTexture( i / (df *2.0),
-                                 (j-1.0)/(df)+.5);
-        }
-    }
+  {
+    float vi = i/df * PI;
+    for (float j = -df / 2.0 +1.0; j <= df / 2.0; j+=1.0 *df/(df+1.0))
+    {
+      float vj = j/df *PI;
+      this->addVertexNormal(cos(vi) * cos(vj),
+                            sin(vj),
+                            sin(vi) * cos(vj));
+
+      this->addVertex(size * cos(vi) * cos(vj),
+                      size * sin(vj),
+                      size * sin(vi) * cos(vj));
+
+      this->addVertexTexture( i / (df *2.0),
+                              (j-1.0)/(df)+.5);
+    }
+  }
   this->addVertex(0, -size, 0);
   this->addVertexNormal(0, -1, 0);
@@ -106,36 +106,36 @@
   unsigned int v1, v2, v3, v4;
   for (int i = 0; i <= detail * 2 -1; i++)
-    {
-      for (int j = 0; j <= detail; j++)
-        {
-
-          v1 = i*detail + j-1;
-          v4 = i*detail + j;
-
-          if (i == detail*2 -1)
-            {
-              v2 = j-1;
-              v3 = j;
-            }
-          else
-            {
-              v2 = (i+1)*detail + j-1;
-              v3 = (i+1)*detail + j;
-            }
-
-          if (j == 0)
-            {
-              v1 = this->getVertexCount() - 2;
-              this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v3, v3, v3, v4, v4, v4);
-            }
-          else if (j == detail)
-            {
-              v3 = this->getVertexCount()-1;
-              this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3);
-            }
-          else
-            this->addFace(4, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3, v4, v4, v4);
-        }
-    }
+  {
+    for (int j = 0; j <= detail; j++)
+    {
+
+      v1 = i*detail + j-1;
+      v4 = i*detail + j;
+
+      if (i == detail*2 -1)
+      {
+        v2 = j-1;
+        v3 = j;
+      }
+      else
+      {
+        v2 = (i+1)*detail + j-1;
+        v3 = (i+1)*detail + j;
+      }
+
+      if (j == 0)
+      {
+        v1 = this->getVertexCount() - 2;
+        this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v3, v3, v3, v4, v4, v4);
+      }
+      else if (j == detail)
+      {
+        v3 = this->getVertexCount()-1;
+        this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3);
+      }
+      else
+        this->addFace(4, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3, v4, v4, v4);
+    }
+  }
 }
 /**
@@ -150,28 +150,29 @@
   // defining Points of the Cylinder.
   for (float phi = 0.0; phi < 2.0*PI; phi += 2.0*PI/(float)detail)
-    {
-      this->addVertex(size*cos(phi), size*sin(phi), -size);
-      this->addVertex(size*cos(phi), size*sin(phi), size);
-      count ++;
-    }
+  {
+    this->addVertex(size*cos(phi), size*sin(phi), -size);
+    this->addVertex(size*cos(phi), size*sin(phi), size);
+    count ++;
+  }
   this->addVertex(0, 0, -size);
   this->addVertex(0, 0, size);
 
   if (count != detail)
+  {
     PRINTF(1)("calculation error, count should be %d but is %d.\n", detail, count);
-
+  }
   // adding Faces
   for (int i = 0; i < detail-1; i++)
-    {
-      int p1, p2, p3, p4;
-      p1 = 2*i;
-      p2 = 2*i+1;
-      p3 = 2*i+3;
-      p4 = 2*i+2;
-      // something is wrong here
-      this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4);
-      this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail);
-      this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+1);
-    }
+  {
+    int p1, p2, p3, p4;
+    p1 = 2*i;
+    p2 = 2*i+1;
+    p3 = 2*i+3;
+    p4 = 2*i+2;
+    // something is wrong here
+    this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4);
+    this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail);
+    this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+1);
+  }
   // caps
   this->addFace(4, VERTEX_ONLY, 2*detail-2, 2*detail-1, 1, 0);
@@ -195,23 +196,23 @@
   // defining the Vertices
   for (float i = 0; i < df; i+=1.0)
-    {
-      float vi = i/df *2.0*PI;
-      this->addVertex(size* sin(vi),
-                      -size,
-                      size* cos(vi));
-    }
+  {
+    float vi = i/df *2.0*PI;
+    this->addVertex(size* sin(vi),
+                    -size,
+                    size* cos(vi));
+  }
 
   //defining Faces
   for (int i = 0; i < detail; i++)
-    {
-      unsigned int v1, v2;
-      v1 = i+2;
-      if (i == detail -1)
-        v2 = 2;
-      else
-        v2 = i+3;
-      this->addFace(3, VERTEX_ONLY, 0, v1, v2);
-      this->addFace(3, VERTEX_ONLY, 1, v1, v2);
-    }
+  {
+    unsigned int v1, v2;
+    v1 = i+2;
+    if (i == detail -1)
+      v2 = 2;
+    else
+      v2 = i+3;
+    this->addFace(3, VERTEX_ONLY, 0, v1, v2);
+    this->addFace(3, VERTEX_ONLY, 1, v1, v2);
+  }
 }
 
@@ -226,21 +227,21 @@
   for (int i = 0; i < detail; i++)
     for (int j = 0; j < detail; j++)
-      {
-        this->addVertex(((float)i/(float)(detail-1) -.5)*size,
-                        0,
-                        ((float)j/(float)(detail-1) -.5)*size);
-        this->addVertexTexture((float)i/(float)(detail-1),
-                               (float)j/(float)(detail-1));
-      }
+    {
+      this->addVertex(((float)i/(float)(detail-1) -.5)*size,
+                      0,
+                      ((float)j/(float)(detail-1) -.5)*size);
+      this->addVertexTexture((float)i/(float)(detail-1),
+                             (float)j/(float)(detail-1));
+    }
   //defining Faces
   unsigned int v1, v2, v3, v4;
   for (int i = 0; i < detail-1; i++)
     for (int j = 0; j < detail-1; j++)
-      {
-        v1 = i*detail + j;
-        v2 = (i+1)*detail + j;
-        v3 = (i+1)*detail + (j+1);
-        v4 = i*detail + (j+1);
-        this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
-      }
-}
+    {
+      v1 = i*detail + j;
+      v2 = (i+1)*detail + j;
+      v3 = (i+1)*detail + (j+1);
+      v4 = i*detail + (j+1);
+      this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
+    }
+}
