Index: orxonox/trunk/src/lib/graphics/importer/Makefile.am
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.am	(revision 3657)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.am	(revision 3658)
@@ -33,5 +33,6 @@
 		  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
 		  $(MAINSRCDIR)/lib/lang/base_object.cc \
-		  $(MAINSRCDIR)/lib/math/vector.cc
+		  $(MAINSRCDIR)/lib/math/vector.cc \
+		  $(MAINSRCDIR)/lib/util/resource_manager.cc
 
 noinst_HEADERS= framework.h \
Index: orxonox/trunk/src/lib/graphics/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 3657)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 3658)
@@ -57,5 +57,5 @@
 	array.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
 	graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \
-	vector.$(OBJEXT)
+	vector.$(OBJEXT) resource_manager.$(OBJEXT)
 importer_OBJECTS = $(am_importer_OBJECTS)
 importer_LDADD = $(LDADD)
@@ -70,4 +70,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/objModel.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/windowHandler.Po
@@ -204,5 +205,6 @@
 		  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
 		  $(MAINSRCDIR)/lib/lang/base_object.cc \
-		  $(MAINSRCDIR)/lib/math/vector.cc
+		  $(MAINSRCDIR)/lib/math/vector.cc \
+		  $(MAINSRCDIR)/lib/util/resource_manager.cc
 
 noinst_HEADERS = framework.h \
@@ -289,4 +291,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
@@ -356,4 +359,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi`
+
+resource_manager.o: $(MAINSRCDIR)/lib/util/resource_manager.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.o -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.o `test -f '$(MAINSRCDIR)/lib/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/util/resource_manager.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/util/resource_manager.cc' object='resource_manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.o `test -f '$(MAINSRCDIR)/lib/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/util/resource_manager.cc
+
+resource_manager.obj: $(MAINSRCDIR)/lib/util/resource_manager.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.obj -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/lib/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/util/resource_manager.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/util/resource_manager.cc' object='resource_manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/lib/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/util/resource_manager.cc'; fi`
 uninstall-info-am:
 
Index: orxonox/trunk/src/lib/graphics/importer/material.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/material.cc	(revision 3657)
+++ orxonox/trunk/src/lib/graphics/importer/material.cc	(revision 3658)
@@ -21,4 +21,5 @@
 #include "texture.h"
 #include "debug.h"
+#include "resource_manager.h"
 #include <stdlib.h>
 #include <string.h>
@@ -61,5 +62,5 @@
     delete []this->name;
   if (this->diffuseTexture)
-    this->diffuseTexture;
+    ResourceManager::unload(this->diffuseTexture);
   if (this->nextMat)
     delete this->nextMat;
@@ -92,5 +93,5 @@
   this->nextMat = NULL;
   this->name ="";
-  this->setIllum(1);
+  this->setIllum(3);
   this->setDiffuse(0,0,0);
   this->setAmbient(0,0,0);
@@ -168,5 +169,4 @@
 }
 
-
 /**
    \brief Set the Name of the Material. (Important for searching)
@@ -322,5 +322,5 @@
 void Material::addTexturePath(char* pathName)
 {
-  PathList::getInstance()->addPath(pathName);
+  ResourceManager::getInstance()->addImageDir(pathName);
 }
 
@@ -334,9 +334,10 @@
 {
   PRINTF(4)("setting Diffuse Map %s\n", dMap);
-    diffuseTexture = new Texture();
-    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
+  //    diffuseTexture = new Texture();
+  //    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
 
   //! \todo check if RESOURCE MANAGER is availiable
-  //this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::load(dMap, IMAGE);
+  //! \todo Textures from .mtl-file need special care.
+  this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::load(dMap, IMAGE);
 }
 
Index: orxonox/trunk/src/lib/graphics/importer/objModel.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/objModel.cc	(revision 3657)
+++ orxonox/trunk/src/lib/graphics/importer/objModel.cc	(revision 3658)
@@ -185,5 +185,4 @@
   delete []fileName;
   return true;
-
 }
 
Index: orxonox/trunk/src/lib/graphics/importer/primitive_model.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/primitive_model.cc	(revision 3657)
+++ orxonox/trunk/src/lib/graphics/importer/primitive_model.cc	(revision 3658)
@@ -24,20 +24,4 @@
 using namespace std;
 
-
-/**
-   \brief standard constructor
-   \todo this constructor is not jet implemented - do it
-*/
-PrimitiveModel::PrimitiveModel () 
-{
-  this->initialize();
-
-  this->cubeModel();
-
-  this->importToGL ();
-
-  this->cleanup();
-}
-
 /**
    \brief Creates a 3D-Model of Primitive-Type type
@@ -75,5 +59,4 @@
 }
 
-
 /**
    \brief standard deconstructor
@@ -83,81 +66,4 @@
 {
   // delete what has to be deleted here
-}
-
-
-
-
-/**
-   \brief Includes a default model
-
-   This will inject a Cube, because this is the most basic model.
-*/
-void PrimitiveModel::cubeModel(void)
-{
-  this->addVertex (-0.5, -0.5, 0.5);
-  this->addVertex (0.5, -0.5, 0.5);
-  this->addVertex (-0.5, 0.5, 0.5);
-  this->addVertex (0.5, 0.5, 0.5);
-  this->addVertex (-0.5, 0.5, -0.5);
-  this->addVertex (0.5, 0.5, -0.5);
-  this->addVertex (-0.5, -0.5, -0.5);
-  this->addVertex (0.5, -0.5, -0.5);
-
-  this->addVertexTexture (0.0, 0.0);
-  this->addVertexTexture (1.0, 0.0);
-  this->addVertexTexture (0.0, 1.0);
-  this->addVertexTexture (1.0, 1.0);
-  this->addVertexTexture (0.0, 2.0);
-  this->addVertexTexture (1.0, 2.0);
-  this->addVertexTexture (0.0, 3.0);
-  this->addVertexTexture (1.0, 3.0);
-  this->addVertexTexture (0.0, 4.0);
-  this->addVertexTexture (1.0, 4.0);
-  this->addVertexTexture (2.0, 0.0);
-  this->addVertexTexture (2.0, 1.0);
-  this->addVertexTexture (-1.0, 0.0);
-  this->addVertexTexture (-1.0, 1.0);
-
-  this->addVertexNormal (0.0, 0.0, 1.0);
-  this->addVertexNormal (0.0, 0.0, 1.0);
-  this->addVertexNormal (0.0, 0.0, 1.0);
-  this->addVertexNormal (0.0, 0.0, 1.0);
-  this->addVertexNormal (0.0, 1.0, 0.0);
-  this->addVertexNormal (0.0, 1.0, 0.0);
-  this->addVertexNormal (0.0, 1.0, 0.0);
-  this->addVertexNormal (0.0, 1.0, 0.0);
-  this->addVertexNormal (0.0, 0.0, -1.0);
-  this->addVertexNormal (0.0, 0.0, -1.0);
-  this->addVertexNormal (0.0, 0.0, -1.0);
-  this->addVertexNormal (0.0, 0.0, -1.0);
-  this->addVertexNormal (0.0, -1.0, 0.0);
-  this->addVertexNormal (0.0, -1.0, 0.0);
-  this->addVertexNormal (0.0, -1.0, 0.0);
-  this->addVertexNormal (0.0, -1.0, 0.0);
-  this->addVertexNormal (1.0, 0.0, 0.0);
-  this->addVertexNormal (1.0, 0.0, 0.0);
-  this->addVertexNormal (1.0, 0.0, 0.0);
-  this->addVertexNormal (1.0, 0.0, 0.0);
-  this->addVertexNormal (-1.0, 0.0, 0.0);
-  this->addVertexNormal (-1.0, 0.0, 0.0);
-  this->addVertexNormal (-1.0, 0.0, 0.0);
-  this->addVertexNormal (-1.0, 0.0, 0.0);
-
-  /* normaleLess-testingMode
-  this->addFace ("1 2 4 3");
-  this->addFace ("3 4 6 5");
-  this->addFace ("5 6 8 7");
-  this->addFace ("7 8 2 1");
-  this->addFace ("2 8 6 4");
-  this->addFace ("7 1 3 5");
-  */
-
-  this->addFace (4, 3, 1,1,1, 2,2,2, 4,4,3, 3,3,4);
-  this->addFace (4, 3, 3,3,5, 4,4,6, 6,6,7, 5,5,8);
-  this->addFace (4, 3, 5,5,9, 6,6,10, 8,8,11, 7,7,12);
-  this->addFace (4, 3, 7,7,13, 8,8,14, 2,10,15, 1,9,16);
-  this->addFace (4, 3, 2,2,17, 8,11,18, 6,12,19, 4,4,20);
-  this->addFace (4, 3, 7,13,21, 1,1,22, 3,3,23, 5,14,24);
-
 }
 
@@ -247,5 +153,4 @@
   this->addVertex(0, 0, size);
 
-  
   if (count != detail)
     PRINTF(1)("calculation error, count should be %d but is %d.\n", detail, count);
Index: orxonox/trunk/src/lib/graphics/importer/primitive_model.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/primitive_model.h	(revision 3657)
+++ orxonox/trunk/src/lib/graphics/importer/primitive_model.h	(revision 3658)
@@ -1,5 +1,6 @@
 /*! 
-    \file primitive_model.h
-
+    \file primitive_model.h 
+    \brief a Class to handle different simple models like planes cubes spheres and so on.
+    (cube is also an option of Model, but is extended here.
 */
 
@@ -10,5 +11,5 @@
 
 //! Specification of different primitives the Model knows
-enum PRIMITIVE {PLANE, CUBE, SPHERE, CYLINDER, CONE};
+enum PRIMITIVE {CUBE, SPHERE, PLANE, CYLINDER, CONE};
 
 // FORWARD DEFINITION \\
@@ -18,11 +19,8 @@
 
  public:
-  PrimitiveModel();
   PrimitiveModel(PRIMITIVE type, float size = 1.0, unsigned int detail = 10);
-
   virtual ~PrimitiveModel();
 
  protected:
-  void cubeModel(void);
   void sphereModel(float size = 1.0, unsigned int detail = 10);
   void cylinderModel(float size = 1.0, unsigned int detail = 10);
