Index: trunk/src/lib/graphics/importer/static_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/static_model.cc	(revision 6315)
+++ trunk/src/lib/graphics/importer/static_model.cc	(revision 6423)
@@ -201,7 +201,7 @@
   this->buildTriangleList();
 
-  this->pModelInfo.pVertices = this->vertices.getArray();
-  this->pModelInfo.pNormals = this->normals.getArray();
-  this->pModelInfo.pTexCoor = this->vTexture.getArray();
+  this->pModelInfo.pVertices = &this->vertices[0];
+  this->pModelInfo.pNormals = &this->normals[0];
+  this->pModelInfo.pTexCoor = &this->vTexture[0];
 
   this->finalized = true;
@@ -402,7 +402,7 @@
   float subbuffer3;
   sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
-  this->vertices.addEntry(subbuffer1*scaleFactor,
-			  subbuffer2*scaleFactor,
-			  subbuffer3*scaleFactor);
+  this->vertices.push_back(subbuffer1*scaleFactor);
+  this->vertices.push_back(subbuffer2*scaleFactor);
+  this->vertices.push_back(subbuffer3*scaleFactor);
   this->pModelInfo.numVertices++;
   return true;
@@ -418,7 +418,7 @@
 {
   PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
-  this->vertices.addEntry(x*scaleFactor,
-			  y*scaleFactor,
-			  z*scaleFactor);
+  this->vertices.push_back(x*scaleFactor);
+  this->vertices.push_back(y*scaleFactor);
+  this->vertices.push_back(z*scaleFactor);
   this->pModelInfo.numVertices++;
   return true;
@@ -437,5 +437,7 @@
   float subbuffer3;
   sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
-  this->normals.addEntry(subbuffer1, subbuffer2, subbuffer3);
+  this->normals.push_back(subbuffer1);
+  this->normals.push_back(subbuffer2);
+  this->normals.push_back(subbuffer3);
   this->pModelInfo.numNormals++;
   return true;
@@ -453,5 +455,7 @@
 {
   PRINTF(5)("found vertex-Normal %f, %f, %f\n", x, y, z);
-  this->normals.addEntry(x, y, z);
+  this->normals.push_back(x);
+  this->normals.push_back(y);
+  this->normals.push_back(z);
   this->pModelInfo.numNormals++;
   return true;
@@ -472,6 +476,6 @@
   float subbuffer2;
   sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
-  this->vTexture.addEntry(subbuffer1);
-  this->vTexture.addEntry(1 - subbuffer2);
+  this->vTexture.push_back(subbuffer1);
+  this->vTexture.push_back(1 - subbuffer2);
   this->pModelInfo.numTexCoor++;
   return true;
@@ -489,6 +493,6 @@
 {
   PRINTF(5)("found vertex-Texture %f, %f\n", u, v);
-  this->vTexture.addEntry(u);
-  this->vTexture.addEntry(v);
+  this->vTexture.push_back(u);
+  this->vTexture.push_back(v);
   this->pModelInfo.numTexCoor++;
   return true;
@@ -631,6 +635,6 @@
   PRINTF(4)("Normals are being calculated.\n");
 
-  Vector* normArray = new Vector [vertices.getCount()/3];
-  for (int i=0; i<vertices.getCount()/3;i++)
+  Vector* normArray = new Vector [vertices.size()/3];
+  for (int i=0; i<vertices.size()/3;i++)
     normArray[i] = Vector(.0,.0,.0);
 
@@ -669,15 +673,15 @@
                   curElem->normalNumber = curElem->vertexNumber;
 
-                  curV = Vector (this->vertices.getArray()[curElem->vertexNumber*3],
-				 this->vertices.getArray()[curElem->vertexNumber*3+1],
-				 this->vertices.getArray()[curElem->vertexNumber*3+2]);
-
-                  prevV = Vector (this->vertices.getArray()[prevElem->vertexNumber*3],
-				  this->vertices.getArray()[prevElem->vertexNumber*3+1],
-				  this->vertices.getArray()[prevElem->vertexNumber*3+2]) - curV;
-
-                  nextV = Vector (this->vertices.getArray()[nextElem->vertexNumber*3],
-				  this->vertices.getArray()[nextElem->vertexNumber*3+1],
-				  this->vertices.getArray()[nextElem->vertexNumber*3+2]) - curV;
+                  curV = Vector (this->vertices[curElem->vertexNumber*3],
+				 this->vertices[curElem->vertexNumber*3+1],
+				 this->vertices[curElem->vertexNumber*3+2]);
+
+                  prevV = Vector (this->vertices[prevElem->vertexNumber*3],
+				  this->vertices[prevElem->vertexNumber*3+1],
+				  this->vertices[prevElem->vertexNumber*3+2]) - curV;
+
+                  nextV = Vector (this->vertices[nextElem->vertexNumber*3],
+				  this->vertices[nextElem->vertexNumber*3+1],
+				  this->vertices[nextElem->vertexNumber*3+2]) - curV;
                   normArray[curElem->vertexNumber] = normArray[curElem->vertexNumber] + nextV.cross(prevV);
 
@@ -691,5 +695,5 @@
     }
 
-  for (int i=0; i < this->vertices.getCount()/3;i++)
+  for (int i=0; i < this->vertices.size()/3;i++)
     {
       normArray[i].normalize();
@@ -711,9 +715,6 @@
 {
   // finalize the Arrays
-  this->vertices.finalizeArray();
-  this->vTexture.finalizeArray();
-  if (normals.getCount() == 0) // vertices-Array must be built for this
+  if (normals.size() == 0) // vertices-Array must be built for this
     this->buildVertexNormals();
-  this->normals.finalizeArray();
 
   this->currentGroup = this->firstGroup;
@@ -806,13 +807,6 @@
     return true;
   /* make sure, that all the arrays are finalized */
-  if( unlikely(!this->vertices.isFinalized()))
-    this->vertices.finalizeArray();
-  if( unlikely(!this->vTexture.isFinalized()))
-    this->vTexture.finalizeArray();
-  if( normals.getCount() == 0) // vertices-Array must be built for this
+  if( normals.size() == 0) // vertices-Array must be built for this
     this->buildVertexNormals();
-  if( unlikely(!this->normals.isFinalized()))
-    this->normals.finalizeArray();
-
 
   int index = 0;                   //!< the counter for the triangle array
@@ -939,5 +933,5 @@
     {
       if (likely(elem->texCoordNumber < this->pModelInfo.numTexCoor))
-        glTexCoord2fv(this->vTexture.getArray() + elem->texCoordNumber * 2);
+        glTexCoord2fv(&this->vTexture[0] + elem->texCoordNumber * 2);
       else
         PRINTF(2)("TextureCoordinate %d is not in the List (max: %d)\nThe Model might be incomplete\n",
@@ -947,5 +941,5 @@
     {
     if (likely(elem->normalNumber < this->pModelInfo.numNormals))
-      glNormal3fv(this->normals.getArray() + elem->normalNumber * 3);
+      glNormal3fv(&this->normals[0] + elem->normalNumber * 3);
     else
         PRINTF(2)("Normal %d is not in the List (max: %d)\nThe Model might be incomplete",
@@ -955,5 +949,5 @@
     {
       if (likely(elem->vertexNumber < this->pModelInfo.numVertices))
-          glVertex3fv(this->vertices.getArray() + elem->vertexNumber * 3);
+          glVertex3fv(&this->vertices[0]+ elem->vertexNumber * 3);
       else
         PRINTF(2)("Vertex %d is not in the List (max: %d)\nThe Model might be incomplete",
