Index: orxonox/trunk/src/lib/graphics/importer/Makefile.am
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.am	(revision 3655)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.am	(revision 3656)
@@ -5,5 +5,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data
-AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gaphics
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang
@@ -30,4 +30,6 @@
 	  	  material.cc \
 		  texture.cc \
+		  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
+		  $(MAINSRCDIR)/lib/lang/base_object.cc \
 		  $(MAINSRCDIR)/lib/math/vector.cc
 
Index: orxonox/trunk/src/lib/graphics/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 3655)
+++ orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 3656)
@@ -55,5 +55,6 @@
 am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
 	model.$(OBJEXT) objModel.$(OBJEXT) array.$(OBJEXT) \
-	material.$(OBJEXT) texture.$(OBJEXT) vector.$(OBJEXT)
+	material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \
+	base_object.$(OBJEXT) vector.$(OBJEXT)
 importer_OBJECTS = $(am_importer_OBJECTS)
 importer_LDADD = $(LDADD)
@@ -61,5 +62,8 @@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/base_object.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/framework.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/graphics_engine.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/objModel.Po ./$(DEPDIR)/texture.Po \
@@ -185,5 +189,5 @@
 target_vendor = @target_vendor@
 MAINSRCDIR = ../../..
-AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/gaphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
+AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
 AM_LDFLAGS = $(MWINDOWS)
 importer_SOURCES = framework.cc \
@@ -194,4 +198,6 @@
 	  	  material.cc \
 		  texture.cc \
+		  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
+		  $(MAINSRCDIR)/lib/lang/base_object.cc \
 		  $(MAINSRCDIR)/lib/math/vector.cc
 
@@ -271,5 +277,7 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
@@ -294,4 +302,36 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+graphics_engine.o: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.o -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.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 graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc
+
+graphics_engine.obj: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.obj -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.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 graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`
+
+base_object.o: $(MAINSRCDIR)/lib/lang/base_object.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.o -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.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 base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc
+
+base_object.obj: $(MAINSRCDIR)/lib/lang/base_object.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.obj -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.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 base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`
 
 vector.o: $(MAINSRCDIR)/lib/math/vector.cc
Index: orxonox/trunk/src/lib/graphics/importer/framework.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/framework.cc	(revision 3655)
+++ orxonox/trunk/src/lib/graphics/importer/framework.cc	(revision 3656)
@@ -76,45 +76,6 @@
     obj = new OBJModel(argv[1]);
   else 
-    {
-      // This is an example, of how it is possible, to create a new Model, and adding some vertex-information.
-      // This also packs everything into a DisplayList, and can be handled exactly as any other model.
-      // This is an example of a cube with Texture-Coordinates, but without explicite Vertex-Normals. (they are soft-created).
-      /*
-      obj = (OBJModel*) new Model();
-      obj->setName("CUBE");
-      obj->addVertex (-0.5, -0.5, 0.5);
-      obj->addVertex (0.5, -0.5, 0.5);
-      obj->addVertex (-0.5, 0.5, 0.5);
-      obj->addVertex (0.5, 0.5, 0.5);
-      obj->addVertex (-0.5, 0.5, -0.5);
-      obj->addVertex (0.5, 0.5, -0.5);
-      obj->addVertex (-0.5, -0.5, -0.5);
-      obj->addVertex (0.5, -0.5, -0.5);
-      
-      obj->addVertexTexture (0.0, 0.0);
-      obj->addVertexTexture (1.0, 0.0);
-      obj->addVertexTexture (0.0, 1.0);
-      obj->addVertexTexture (1.0, 1.0);
-      obj->addVertexTexture (0.0, 2.0);
-      obj->addVertexTexture (1.0, 2.0);
-      obj->addVertexTexture (0.0, 3.0);
-      obj->addVertexTexture (1.0, 3.0);
-      obj->addVertexTexture (0.0, 4.0);
-      obj->addVertexTexture (1.0, 4.0);
-      obj->addVertexTexture (2.0, 0.0);
-      obj->addVertexTexture (2.0, 1.0);
-      obj->addVertexTexture (-1.0, 0.0);
-      obj->addVertexTexture (-1.0, 1.0);
-
-      obj->addFace ("1 2 4 3");
-      obj->addFace ("3 4 6 5");
-      obj->addFace ("5 6 8 7");
-      obj->addFace ("7 8 2 1");
-      obj->addFace ("2 8 6 4");
-      obj->addFace ("7 1 3 5");
-      obj->finalize();
-      */
-      obj = (OBJModel*) new Model(CYLINDER);
-    }
+    obj = (OBJModel*) new Model(SPHERE);
+
   M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); 
   rotAxis = Vector (0.0,1.0,0.0);
@@ -166,5 +127,5 @@
       switch (event.type) {
       case SDL_MOUSEMOTION:
-	PRINTF(3)("Mouse motion about %d,%d Pixels to (%d,%d).\n", 
+	PRINTF(4)("Mouse motion about %d,%d Pixels to (%d,%d).\n", 
 		  event.motion.xrel, event.motion.yrel,
 		  event.motion.x, event.motion.y);
@@ -205,10 +166,10 @@
 	if (event.button.button == 4)
 	  {
-	    PRINTF(0)("MouseWheel up\n");
+	    PRINTF(4)("MouseWheel up\n");
 	    zoomTo *= .5;
 	  }
 	else if (event.button.button == 5)
 	  {
-	    PRINTF(2)("MouseWheel down\n");
+	    PRINTF(4)("MouseWheel down\n");
 	    zoomTo *= 2.0;
 	  }
@@ -240,5 +201,5 @@
 	else 
 	    {
-	      PRINTF(2)("MouseButton %d released at (%d,%d).\n",
+	      PRINTF(4)("MouseButton %d released at (%d,%d).\n",
 			event.button.button, event.button.x, event.button.y);
 	    }
Index: orxonox/trunk/src/lib/graphics/importer/framework.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/framework.h	(revision 3655)
+++ orxonox/trunk/src/lib/graphics/importer/framework.h	(revision 3656)
@@ -4,4 +4,5 @@
 #include "windowHandler.h" // Include the Whandler Basecode
 #include "objModel.h"
+#include "vector.h"
 
 class Vector;
Index: orxonox/trunk/src/lib/graphics/importer/model.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3655)
+++ orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3656)
@@ -797,52 +797,52 @@
 void Model::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");
+  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
@@ -855,58 +855,79 @@
   */
 
-  this->addFace ("1/1/1 2/2/2 4/4/3 3/3/4");
-  this->addFace ("3/3/5 4/4/6 6/6/7 5/5/8");
-  this->addFace ("5/5/9 6/6/10 8/8/11 7/7/12");
-  this->addFace ("7/7/13 8/8/14 2/10/15 1/9/16");
-  this->addFace ("2/2/17 8/11/18 6/12/19 4/4/20");
-  this->addFace ("7/13/21 1/1/22 3/3/23 5/14/24");
-
-}
-
-/**
-   \brief Builds a Sphere into the Model
-*/
-void Model::sphereModel()
-{
-  int detail = 30;
-  if (detail <= 0) detail = 1;
+  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 Model::sphereModel(float size, unsigned int detail)
+{
+  int vertexCount = 0;
+  if (detail <= 0) 
+    detail = 1;
+  //  detail = 2; // make it even
   float df = (float)detail;
-  for (float i = 0.0; i < df/2; i+=1.0)
-    {
-      for (float j = 0.0; j < df; j+=1.0)
-      {
-	float vz = i/df *2.0*PI - PI/2.0;
-	this->addVertex(cos(j/df*2.0*PI) * cos(vz) ,
-			sin(j/df*2.0*PI) * cos(vz),
-			sin(vz));
-	//if (j==0.0)
-	//printf ("%f %f\n", vz, sin (vz));
-	if (i==0.0)
-	  PRINTF(0)("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
-      }
-    }
-  vertices->debug();
-  for (int i = 0; i < detail/2; i++)
-    for (int j = 1; j < detail; j++)
-      {
-	unsigned int v1,v2,v3,v4;
-	v1 = i*detail +j;
-
-	/*	if (j+1 == detail)
-	  {
-	    v2 = i*detail +1;
-	    v3 = i*detail+detail + 1;
-	  }
-	  else*/
-	  {
-	    v2 = i*detail +j+1;
-	    v3 = i*detail+detail + j+1;
-	  }
-	v4 = i*detail+detail + j;
-	//printf("%i %i %i %i\n", v1, v2, v3, v4);
-	this->addFace(4, 0, v1, v2, v3, v4);
-      }
-}
-
+  
+  // 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.
@@ -955,2 +976,9 @@
 
 }
+
+
+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 3655)
+++ orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3656)
@@ -114,6 +114,7 @@
 
   void cubeModel(void);
-  void sphereModel(void);
+  void sphereModel(float size = 1.0, unsigned int detail = 10);
   void cylinderModel(void);
+  void coneModel(float size = 1.0, unsigned int detail = 10);
 };
 
