Index: /orxonox/trunk/src/lib/graphics/importer/framework.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/framework.cc	(revision 3908)
+++ /orxonox/trunk/src/lib/graphics/importer/framework.cc	(revision 3909)
@@ -58,5 +58,5 @@
 int main(int argc, char *argv[])
 {
-  verbose = 3;
+  verbose = 4;
 
   Uint8* keys; // This variable will be used in the keyboard routine
Index: /orxonox/trunk/src/lib/graphics/importer/model.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3908)
+++ /orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3909)
@@ -27,20 +27,27 @@
 
 /**
-   \brief Creates a 3D-Model.
-
-   This only initializes a 3D-Model, but does not cleanup the Faces.
-*/
-Model::Model(void)
-{
-  this->initialize();
-}
-
-/**
    \brief Creates a 3D-Model. and assigns it a Name.
 */
-Model::Model(char* modelName)
-{
-  this->initialize();
+Model::Model(const char* modelName)
+{
+  PRINTF(4)("new 3D-Model is being created\n"); 
+  this->name = NULL;
   this->setName(modelName);
+
+
+  this->finalized = false;
+  // setting the start group;
+  this->firstGroup = new Group;
+  this->currentGroup = this->firstGroup;
+  this->groupCount = 0;
+  
+  this->initGroup (this->currentGroup);
+  this->scaleFactor = 1;
+  this->material = new Material();
+
+  this->vertices = new Array();
+  this->vTexture = new Array();
+  this->normals = new Array();
+
 }
 
@@ -169,32 +176,4 @@
 
 /**
-    \brief initializes the Model.
-
-    This Function initializes all the needed arrays, Lists and clientStates.
-    It also defines default values.
-*/
-bool Model::initialize (void)
-{
-  PRINTF(4)("new 3D-Model is being created\n"); 
-
-  this->name = NULL;
-  this->finalized = false;
-  // setting the start group;
-  this->firstGroup = new Group;
-  this->currentGroup = this->firstGroup;
-  this->groupCount = 0;
-  
-  this->initGroup (this->currentGroup);
-  this->scaleFactor = 1;
-  this->material = new Material();
-
-  this->vertices = new Array();
-  this->vTexture = new Array();
-  this->normals = new Array();
-
-  return true;
-}
-
-/**
    \brief sets a name to the Model
    \param name The name to set to this Model
@@ -204,6 +183,11 @@
   if (this->name) 
     delete this->name;
-  this->name = new char[strlen(name)+1];
-  strcpy(this->name, name);
+  if (name)
+    {
+      this->name = new char[strlen(name)+1];
+      strcpy(this->name, name);
+    }
+  else 
+    this->name = NULL;
 }
 /**
@@ -348,5 +332,5 @@
    If a vertex line is found this function will inject it into the vertex-Array
 */
-bool Model::addVertex (char* vertexString)
+bool Model::addVertex (const char* vertexString)
 {
   float subbuffer1;
@@ -379,5 +363,5 @@
    If a face line is found this function will add it to the glList.
 */
-bool Model::addFace (char* faceString)
+bool Model::addFace (const char* faceString)
 {
   if (this->currentGroup->faceCount >0)
@@ -477,5 +461,5 @@
    If a vertexNormal line is found this function will inject it into the vertexNormal-Array
 */
-bool Model::addVertexNormal (char* normalString)
+bool Model::addVertexNormal (const char* normalString)
 {
   float subbuffer1;
@@ -509,5 +493,5 @@
    this function will inject it into the vertexTexture-Array
 */
-bool Model::addVertexTexture (char* vTextureString)
+bool Model::addVertexTexture (const char* vTextureString)
 {
   float subbuffer1;
@@ -540,11 +524,4 @@
 bool Model::addUseMtl (const char* matString)
 {
-  /*
-  if (!this->mtlFileName)
-    {
-      PRINTF(4)("Not using new defined material, because no mtlFile found yet\n");
-      return false;
-    }
-  */      
   if (this->currentGroup->faceCount > 0)
     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
Index: /orxonox/trunk/src/lib/graphics/importer/model.h
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3908)
+++ /orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3909)
@@ -29,6 +29,5 @@
 {
  public:
-  Model(void);
-  Model(char* modelName);
+  Model(const char* modelName = NULL);
   virtual ~Model(void);
 
@@ -92,5 +91,4 @@
   float scaleFactor;    //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation
 
-  bool initialize(void);
   bool initGroup(Group* group);
   bool initFace (Face* face);
@@ -102,11 +100,11 @@
  public:
   bool addGroup(const char* groupString);
-  bool addVertex(char* vertexString);
+  bool addVertex(const char* vertexString);
   bool addVertex(float x, float y, float z);
-  bool addFace(char* faceString);
+  bool addFace(const char* faceString);
   bool addFace(int faceElemCount, VERTEX_FORMAT type, ...);
-  bool addVertexNormal(char* normalString);
+  bool addVertexNormal(const char* normalString);
   bool addVertexNormal(float x, float y, float z);
-  bool addVertexTexture(char* vTextureString);
+  bool addVertexTexture(const char* vTextureString);
   bool addVertexTexture(float u, float v);
   bool addUseMtl(const char* mtlString);
Index: /orxonox/trunk/src/lib/graphics/importer/objModel.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/objModel.cc	(revision 3908)
+++ /orxonox/trunk/src/lib/graphics/importer/objModel.cc	(revision 3909)
@@ -23,6 +23,4 @@
 
 #define PARSELINELENGTH 8192
-
-#include <fstream>
 
 #include "debug.h"
@@ -69,6 +67,4 @@
   this->objFileName = NULL;
   this->mtlFileName = NULL;
-
-  this->initialize();
 }
 
@@ -135,9 +131,7 @@
   char readLine[PARSELINELENGTH];
   char buffer[PARSELINELENGTH];
-  int i = 0;
   while(fgets(readLine, PARSELINELENGTH, stream))
     { 
       strcpy(buffer, readLine);
-      i++;
       // case vertice
       if (!strncmp(buffer, "v ", 2))
@@ -206,22 +200,17 @@
   
 
-  PRINTF(4)("Opening mtlFile: %s\n", fileName);
-
-  ifstream* MTL_FILE = new ifstream (fileName);
-  if (MTL_FILE->fail())
-    {
-      PRINTF(2)("unable to open file: %s\n", fileName);
-      MTL_FILE->close();
-      delete []fileName;
-      delete MTL_FILE;
+  FILE* stream;
+  if( (stream = fopen (fileName, "r")) == NULL)
+    {
+      printf("IniParser could not open %s\n", fileName);
       return false;
     }
-  char buffer[500];
+
+  char readLine[PARSELINELENGTH];
+  char buffer[PARSELINELENGTH];
   Material* tmpMat = material;
-  while(!MTL_FILE->eof())
-    {
-      MTL_FILE->getline(buffer, 500);
+  while(fgets(readLine, PARSELINELENGTH, stream))
+    {
       PRINTF(5)("found line in mtlFile: %s\n", buffer);
-      
 
       // create new Material
@@ -286,7 +275,6 @@
 
     }
-  MTL_FILE->close();
+  fclose(stream);
   delete []fileName;
-  delete MTL_FILE;
   return true;
 }
Index: /orxonox/trunk/src/lib/graphics/importer/primitive_model.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/primitive_model.cc	(revision 3908)
+++ /orxonox/trunk/src/lib/graphics/importer/primitive_model.cc	(revision 3909)
@@ -33,6 +33,4 @@
 PrimitiveModel::PrimitiveModel(PRIMITIVE type, float size, unsigned int detail)
 {
-  this->initialize();
-
   switch (type)
     {
