Index: orxonox/trunk/src/Makefile.am
===================================================================
--- orxonox/trunk/src/Makefile.am	(revision 3656)
+++ orxonox/trunk/src/Makefile.am	(revision 3657)
@@ -59,4 +59,5 @@
 		 lib/graphics/importer/array.cc \
 		 lib/graphics/importer/objModel.cc \
+		 lib/graphics/importer/primitive_model.cc \
 		 lib/graphics/importer/model.cc \
 		 lib/graphics/importer/material.cc \
Index: orxonox/trunk/src/Makefile.in
===================================================================
--- orxonox/trunk/src/Makefile.in	(revision 3656)
+++ orxonox/trunk/src/Makefile.in	(revision 3657)
@@ -65,6 +65,6 @@
 	data_tank.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \
 	fontset.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
-	model.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
-	base_entity.$(OBJEXT) base_object.$(OBJEXT) \
+	primitive_model.$(OBJEXT) model.$(OBJEXT) material.$(OBJEXT) \
+	texture.$(OBJEXT) base_entity.$(OBJEXT) base_object.$(OBJEXT) \
 	ini_parser.$(OBJEXT) list.$(OBJEXT) resource_manager.$(OBJEXT) \
 	vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
@@ -93,4 +93,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/primitive.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/projectile.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
@@ -264,4 +265,5 @@
 		 lib/graphics/importer/array.cc \
 		 lib/graphics/importer/objModel.cc \
+		 lib/graphics/importer/primitive_model.cc \
 		 lib/graphics/importer/model.cc \
 		 lib/graphics/importer/material.cc \
@@ -434,4 +436,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projectile.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
@@ -832,4 +835,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 objModel.obj `if test -f 'lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) 'lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/importer/objModel.cc'; fi`
+
+primitive_model.o: lib/graphics/importer/primitive_model.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.o -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.o `test -f 'lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`lib/graphics/importer/primitive_model.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/importer/primitive_model.cc' object='primitive_model.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.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 primitive_model.o `test -f 'lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`lib/graphics/importer/primitive_model.cc
+
+primitive_model.obj: lib/graphics/importer/primitive_model.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.obj -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.obj `if test -f 'lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) 'lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/importer/primitive_model.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/importer/primitive_model.cc' object='primitive_model.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.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 primitive_model.obj `if test -f 'lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) 'lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/importer/primitive_model.cc'; fi`
 
 model.o: lib/graphics/importer/model.cc
Index: orxonox/trunk/src/lib/graphics/importer/Makefile.am
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.am	(revision 3656)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.am	(revision 3657)
@@ -27,4 +27,5 @@
 	  	  model.cc \
 		  objModel.cc \
+		  primitive_model.cc \
 	  	  array.cc \
 	  	  material.cc \
@@ -38,4 +39,5 @@
 	  	model.h \
 		objModel.h \
+		primitive_model.h \
 	  	array.h \
 		material.h \
Index: orxonox/trunk/src/lib/graphics/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 3656)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 3657)
@@ -54,7 +54,8 @@
 PROGRAMS = $(bin_PROGRAMS)
 am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
-	model.$(OBJEXT) objModel.$(OBJEXT) array.$(OBJEXT) \
-	material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \
-	base_object.$(OBJEXT) vector.$(OBJEXT)
+	model.$(OBJEXT) objModel.$(OBJEXT) primitive_model.$(OBJEXT) \
+	array.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
+	graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \
+	vector.$(OBJEXT)
 importer_OBJECTS = $(am_importer_OBJECTS)
 importer_LDADD = $(LDADD)
@@ -67,6 +68,8 @@
 @AMDEP_TRUE@	./$(DEPDIR)/graphics_engine.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/objModel.Po ./$(DEPDIR)/texture.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/windowHandler.Po
+@AMDEP_TRUE@	./$(DEPDIR)/objModel.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/windowHandler.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -195,4 +198,5 @@
 	  	  model.cc \
 		  objModel.cc \
+		  primitive_model.cc \
 	  	  array.cc \
 	  	  material.cc \
@@ -206,4 +210,5 @@
 	  	model.h \
 		objModel.h \
+		primitive_model.h \
 	  	array.h \
 		material.h \
@@ -283,4 +288,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
 @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)/texture.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
Index: orxonox/trunk/src/lib/graphics/importer/framework.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/framework.cc	(revision 3656)
+++ orxonox/trunk/src/lib/graphics/importer/framework.cc	(revision 3657)
@@ -17,4 +17,7 @@
 
 #include "vector.h"
+
+#include "primitive_model.h"
+
 
 int verbose;
@@ -76,5 +79,5 @@
     obj = new OBJModel(argv[1]);
   else 
-    obj = (OBJModel*) new Model(SPHERE);
+    obj = new PrimitiveModel(SPHERE);
 
   M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); 
Index: orxonox/trunk/src/lib/graphics/importer/framework.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/framework.h	(revision 3656)
+++ orxonox/trunk/src/lib/graphics/importer/framework.h	(revision 3657)
@@ -35,5 +35,5 @@
 
 WindowHandler wHandler;  // Create an instance of the whandler basecode class
-OBJModel* obj;
+Model* obj;
 
 
Index: orxonox/trunk/src/lib/graphics/importer/model.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3656)
+++ orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3657)
@@ -34,34 +34,4 @@
 {
   this->initialize();
-}
-
-/**
-   \brief Creates a 3D-Model of Primitive-Type type
-
-   if you want to just display a Cube/Sphere/Cylinder/... without any material.
-   
-   \todo implement Cube/Sphere/Cylinder/...
-*/
-Model::Model(PRIMITIVE type)
-{
-  this->initialize();
-
-  switch (type)
-    {
-    default:
-    case CUBE:
-      this->cubeModel();
-      break;
-    case SPHERE:
-      this->sphereModel();
-      break;
-    case CYLINDER:
-      this->cylinderModel();
-      break;
-
-    }
-  this->importToGL ();
-
-  this->cleanup();
 }
 
@@ -492,7 +462,7 @@
 
       tmpElem->vertexNumber = va_arg (itemlist, int) -1;
-      if (type >= 2)
+      if (type & TEXCOORD)
 	tmpElem->texCoordNumber = va_arg (itemlist, int) -1;
-      if (type == 1 || type ==3)
+      if (type & NORMAL)
  	tmpElem->normalNumber = va_arg(itemlist, int) -1;
       this->currentGroup->currentFace->vertexCount++;
@@ -863,122 +833,2 @@
 
 }
-
-/**
-   \brief Builds a Sphere into the Model.
-   \param size The radius of the Sphere.
-   \param detail The detail of the Sphere.
-*/
-void Model::sphereModel(float size, unsigned int detail)
-{
-  int vertexCount = 0;
-  if (detail <= 0) 
-    detail = 1;
-  //  detail = 2; // make it even
-  float df = (float)detail;
-  
-  // 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->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);
-	  vertexCount++;
-	}
-    }
-  this->addVertex(0, -size, 0);
-  this->addVertex(0, size, 0);
-
-  // defining the binding Faces.
-  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;
-	  v4 = i*detail + (j+1);
-	  
-	  if (i == detail*2 -1)
-	    {
-	      v2 = j;
-	      v3 = j+1;
-	    }
-	  else
-	    {
-	      v2 = (i+1)*detail + j;
-	      v3 = (i+1)*detail + (j+1);
-	    }
-	  
-	  if (j == 0)
-	    {
-	      v1 = vertexCount+1;
-	      this->addFace(3, 2, v1, v1, v3, v3, v4, v4);
-	    }
-	  else if (j == detail)
-	    {
-	      v3 = vertexCount+2;
-	      this->addFace(3, 2, v1, v1, v2, v2, v3, v3);
-	    }
-	  else
-	    this->addFace(4, 2, v1, v1, v2, v2, v3, v3, v4, v4);
-	}
-    }
-}
-/**
-   \brief Creates a Cylinder.
-*/
-void Model::cylinderModel(void)
-{
-  unsigned int detail = 20;
-  float size = 1.0;
-
-  // check if devision by zero
-  if (detail <= 3)
-    detail = 3;
-  int count = 0;
-  // 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(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);
-  vertices->debug();
-
-  // adding Faces
-  for (int i = 0; i < detail-1; i++)
-    {
-      int p1, p2, p3, p4;
-      p1 = 2*i+1;
-      p2 = 2*i+2;
-      if (i <= detail);
-      p3 = 2*i+4;
-      p4 = 2*i+3;
-      // something is wrong here
-      this->addFace(4, 0, p1, p2, p3, p4);
-      this->addFace(3, 0, p4, p1, 2*detail+1);
-      this->addFace(3, 0, p2, p3, 2*detail+2);
-    }
-  addFace(4,0, 2*detail-1, 2*detail, 2, 1);
-  this->addFace(3, 0, 1, 2*detail-1, 2*detail+1);
-  this->addFace(3, 0, 2*detail, 2, 2*detail+2);
-
-}
-
-
-void Model::coneModel(float size, unsigned int detail)
-{
-
-  
-}
Index: orxonox/trunk/src/lib/graphics/importer/model.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3656)
+++ orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3657)
@@ -15,6 +15,8 @@
 using namespace std;
 
-//! Specification of different primitives the Model knows
-enum PRIMITIVE {PLANE, CUBE, SPHERE, CYLINDER};
+// definition of different modes for setting up Faces
+#define VERTEX 0       //!< If Faces are created WITH Vertex-Coordinate
+#define NORMAL 1       //!< If Faces are created WITH Normals (otherwise autocalculate)
+#define TEXCOORD 2     //!< If Faces are created WITH TextureCoordinate
 
 //! Class that handles 3D-Models. it can also read them in and display them.
@@ -23,5 +25,4 @@
  public:
   Model(void);
-  Model(PRIMITIVE type);
   Model(char* modelName);
   virtual ~Model(void);
@@ -114,7 +115,4 @@
 
   void cubeModel(void);
-  void sphereModel(float size = 1.0, unsigned int detail = 10);
-  void cylinderModel(void);
-  void coneModel(float size = 1.0, unsigned int detail = 10);
 };
 
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 3657)
@@ -0,0 +1,336 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_MODEL
+
+#include "primitive_model.h"
+
+#include <math.h>
+#include "vector.h"
+#include "debug.h"
+
+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
+
+   if you want to just display a Cube/Sphere/Cylinder/... without any material.
+   
+   \todo implement Cube/Sphere/Cylinder/...
+*/
+PrimitiveModel::PrimitiveModel(PRIMITIVE type, float size, unsigned int detail)
+{
+  this->initialize();
+
+  switch (type)
+    {
+    default:
+    case CUBE:
+      this->cubeModel();
+      break;
+    case SPHERE:
+      this->sphereModel(size, detail);
+      break;
+    case CYLINDER:
+      this->cylinderModel();
+      break;
+    case CONE:
+      this->coneModel(size, detail);
+      break;
+    case PLANE:
+      this->planeModel(size, detail);
+      break;
+    }
+  this->importToGL ();
+
+  this->cleanup();
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+PrimitiveModel::~PrimitiveModel () 
+{
+  // 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);
+
+}
+
+/**
+   \brief Builds a Sphere into the Model.
+   \param size The radius of the Sphere.
+   \param detail The detail of the Sphere.
+*/
+void PrimitiveModel::sphereModel(float size, unsigned int detail)
+{
+  int vertexCount = 0;
+  if (detail <= 0) 
+    detail = 1;
+  //  detail = 2; // make it even
+  float df = (float)detail;
+  
+  // 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->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);
+	  vertexCount++;
+	}
+    }
+  this->addVertex(0, -size, 0);
+  this->addVertex(0, size, 0);
+
+  // defining the binding Faces.
+  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;
+	  v4 = i*detail + (j+1);
+	  
+	  if (i == detail*2 -1)
+	    {
+	      v2 = j;
+	      v3 = j+1;
+	    }
+	  else
+	    {
+	      v2 = (i+1)*detail + j;
+	      v3 = (i+1)*detail + (j+1);
+	    }
+	  
+	  if (j == 0)
+	    {
+	      v1 = vertexCount+1;
+	      this->addFace(3, TEXCOORD, v1, v1, v3, v3, v4, v4);
+	    }
+	  else if (j == detail)
+	    {
+	      v3 = vertexCount+2;
+	      this->addFace(3, TEXCOORD, v1, v1, v2, v2, v3, v3);
+	    }
+	  else
+	    this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
+	}
+    }
+}
+/**
+   \brief Creates a Cylinder.
+*/
+void PrimitiveModel::cylinderModel(float size, unsigned int detail)
+{
+  // check if devision by zero
+  if (detail <= 3)
+    detail = 3;
+  int count = 0;
+  // 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(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+1;
+      p2 = 2*i+2;
+      if (i <= detail);
+      p3 = 2*i+4;
+      p4 = 2*i+3;
+      // something is wrong here
+      this->addFace(4, 0, p1, p2, p3, p4);
+      this->addFace(3, 0, p4, p1, 2*detail+1);
+      this->addFace(3, 0, p2, p3, 2*detail+2);
+    }
+  addFace(4,0, 2*detail-1, 2*detail, 2, 1);
+  this->addFace(3, VERTEX, 1, 2*detail-1, 2*detail+1);
+  this->addFace(3, VERTEX, 2*detail, 2, 2*detail+2);
+}
+
+/**
+   \brief creates a cone inside of this Model
+   \param size The size of the cone
+   \param detail the Detail-level of this cone
+*/
+void PrimitiveModel::coneModel(float size, unsigned int detail)
+{
+  this->addVertex(0,-size,0);
+  this->addVertex(0,size,0);
+  if (detail <= 0) 
+    detail = 1;
+  float df = (float)detail;
+  
+  // 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));
+    }
+
+  //defining Faces
+  for (int i = 0; i < detail; i++)
+    {
+      unsigned int v1, v2;
+      v1 = i+3;
+      if (i == detail -1)
+	v2 = 3;
+      else
+	v2 = i+4;
+      this->addFace(3, VERTEX, 1, v1, v2);
+      this->addFace(3, VERTEX, 2, v1, v2); 
+    }
+}
+
+/**
+   \brief creates a Plane inside of this Model
+   \param size The size of this plane
+   \param detail the Detail-level of this plane.
+*/
+void PrimitiveModel::planeModel(float size, unsigned int detail)
+{
+  //defining vertices
+  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));
+      }
+  //defining Faces
+  unsigned int v1, v2, v3, v4;
+  for (int i = 0; i < detail-1; i++)
+    for (int j = 1; j < detail; j++)
+      {
+	v1 = i*detail + j;
+	v2 = (i+1)*detail + j;
+	v3 = (i+1)*detail + (j+1);
+	v4 = i*detail + (j+1);
+	this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
+      }
+}
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 3657)
@@ -0,0 +1,33 @@
+/*! 
+    \file primitive_model.h
+
+*/
+
+#ifndef _PRIMITIVE_MODEL_H
+#define _PRIMITIVE_MODEL_H
+
+#include "model.h"
+
+//! Specification of different primitives the Model knows
+enum PRIMITIVE {PLANE, CUBE, SPHERE, CYLINDER, CONE};
+
+// FORWARD DEFINITION \\
+
+//! A Class to create some default Models
+class PrimitiveModel : public Model {
+
+ 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);
+  void coneModel(float size = 1.0, unsigned int detail = 10);
+  void planeModel(float size = 1.0, unsigned int detail = 1);
+};
+
+#endif /* _PRIMITIVE_MODEL_H */
Index: orxonox/trunk/src/lib/util/resource_manager.cc
===================================================================
--- orxonox/trunk/src/lib/util/resource_manager.cc	(revision 3656)
+++ orxonox/trunk/src/lib/util/resource_manager.cc	(revision 3657)
@@ -20,4 +20,5 @@
 // different resource Types
 #include "objModel.h"
+#include "primitive_model.h"
 #include "texture.h"
 
@@ -110,5 +111,5 @@
 	{
 	  PRINTF(2)("Sorry, %s does not exist. Loading a cube-Model instead\n", tmpName);
-	  tmpResource = new Model(CUBE);
+	  tmpResource = new PrimitiveModel(CUBE);
 	}
       break;
