Index: orxonox/trunk/src/Makefile.am
===================================================================
--- orxonox/trunk/src/Makefile.am	(revision 3677)
+++ orxonox/trunk/src/Makefile.am	(revision 3678)
@@ -44,5 +44,4 @@
 		 world_entities/skysphere.cc \
 		 world_entities/terrain.cc \
-		 world_entities/primitive.cc \
 		 world_entities/weapon.cc \
 		 world_entities/projectile.cc \
@@ -95,5 +94,4 @@
 		 world_entities/power_up.h \
 		 world_entities/terrain.h \
-		 world_entities/primitive.h \
 		 world_entities/weapon.h \
 		 world_entities/projectile.h \
Index: orxonox/trunk/src/Makefile.in
===================================================================
--- orxonox/trunk/src/Makefile.in	(revision 3677)
+++ orxonox/trunk/src/Makefile.in	(revision 3678)
@@ -59,8 +59,8 @@
 	story_entity.$(OBJEXT) campaign.$(OBJEXT) world.$(OBJEXT) \
 	world_entity.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \
-	skysphere.$(OBJEXT) terrain.$(OBJEXT) primitive.$(OBJEXT) \
-	weapon.$(OBJEXT) projectile.$(OBJEXT) \
-	character_attributes.$(OBJEXT) test_gun.$(OBJEXT) ai.$(OBJEXT) \
-	p_node.$(OBJEXT) null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
+	skysphere.$(OBJEXT) terrain.$(OBJEXT) weapon.$(OBJEXT) \
+	projectile.$(OBJEXT) character_attributes.$(OBJEXT) \
+	test_gun.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \
+	null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
 	data_tank.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \
 	fontset.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
@@ -92,5 +92,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/primitive.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/player.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/projectile.Po \
@@ -250,5 +250,4 @@
 		 world_entities/skysphere.cc \
 		 world_entities/terrain.cc \
-		 world_entities/primitive.cc \
 		 world_entities/weapon.cc \
 		 world_entities/projectile.cc \
@@ -301,5 +300,4 @@
 		 world_entities/power_up.h \
 		 world_entities/terrain.h \
-		 world_entities/primitive.h \
 		 world_entities/weapon.h \
 		 world_entities/projectile.h \
@@ -435,5 +433,4 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@
 @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@
@@ -595,20 +592,4 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o terrain.obj `if test -f 'world_entities/terrain.cc'; then $(CYGPATH_W) 'world_entities/terrain.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/terrain.cc'; fi`
-
-primitive.o: world_entities/primitive.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive.o -MD -MP -MF "$(DEPDIR)/primitive.Tpo" -c -o primitive.o `test -f 'world_entities/primitive.cc' || echo '$(srcdir)/'`world_entities/primitive.cc; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/primitive.Tpo" "$(DEPDIR)/primitive.Po"; else rm -f "$(DEPDIR)/primitive.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/primitive.cc' object='primitive.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/primitive.Po' tmpdepfile='$(DEPDIR)/primitive.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.o `test -f 'world_entities/primitive.cc' || echo '$(srcdir)/'`world_entities/primitive.cc
-
-primitive.obj: world_entities/primitive.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive.obj -MD -MP -MF "$(DEPDIR)/primitive.Tpo" -c -o primitive.obj `if test -f 'world_entities/primitive.cc'; then $(CYGPATH_W) 'world_entities/primitive.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/primitive.cc'; fi`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/primitive.Tpo" "$(DEPDIR)/primitive.Po"; else rm -f "$(DEPDIR)/primitive.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/primitive.cc' object='primitive.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/primitive.Po' tmpdepfile='$(DEPDIR)/primitive.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.obj `if test -f 'world_entities/primitive.cc'; then $(CYGPATH_W) 'world_entities/primitive.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/primitive.cc'; fi`
 
 weapon.o: world_entities/weapon.cc
Index: orxonox/trunk/src/glmenu/glmenu_imagescreen.cc
===================================================================
--- orxonox/trunk/src/glmenu/glmenu_imagescreen.cc	(revision 3677)
+++ orxonox/trunk/src/glmenu/glmenu_imagescreen.cc	(revision 3678)
@@ -41,5 +41,5 @@
 {
    this->setClassName ("GLMenuImageScreen");
-   this->backMat = NULL;
+   this->init();
 }
 
Index: orxonox/trunk/src/orxonox.cc
===================================================================
--- orxonox/trunk/src/orxonox.cc	(revision 3677)
+++ orxonox/trunk/src/orxonox.cc	(revision 3678)
@@ -341,5 +341,4 @@
 #include "player.h"
 #include "base_object.h"
-#include "primitive.h"
 #include <asm/msr.h>
 #include <linux/timex.h>
@@ -397,18 +396,19 @@
       printf(" Generate a WorldEntity object:\t\t%11.2f\n", mi);
       
-      mittel = 0;
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  WorldEntity* w = new Primitive(P_SPHERE);
-	  
-	  rdtscl(end);
-	  delete w;
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)ITERATIONS;
-      printf(" Generate a Primitive  object:\t\t%11.2f\n", mi);
-
+      /*
+	mittel = 0;
+	for(i = 0; i < ITERATIONS; ++i)
+	{
+	rdtscl(ini);
+	
+	WorldEntity* w = new Primitive(P_SPHERE);
+	
+	rdtscl(end);
+	delete w;
+	mittel += (end - ini - dt);
+	}
+	mi = mittel / (float)ITERATIONS;
+	printf(" Generate a Primitive  object:\t\t%11.2f\n", mi);
+      */
 
       mittel = 0;
@@ -500,19 +500,19 @@
  
       
-      
-      mittel = 0;
-      w = new Primitive(P_SPHERE);
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  w->tick(0.0f);
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)ITERATIONS;
-      printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);
-      
+      /*
+	mittel = 0;
+	w = new Primitive(P_SPHERE);
+	for(i = 0; i < ITERATIONS; ++i)
+	{
+	rdtscl(ini);
+	
+	w->tick(0.0f);
+	
+	rdtscl(end);
+	mittel += (end - ini - dt);
+	}
+	mi = mittel / (float)ITERATIONS;
+	printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);
+      */
       
     }
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 3677)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 3678)
@@ -29,5 +29,4 @@
 #include "camera.h"
 #include "environment.h"
-#include "primitive.h"
 #include "skysphere.h"
 #include "terrain.h"
@@ -388,7 +387,4 @@
 	    Vector* es = new Vector (20, 0, 0);
 	    Quaternion* qs = new Quaternion ();
-	    WorldEntity* pr = new Primitive(P_SPHERE);
-	    pr->setName("primitive");
-	    this->spawn(pr, this->localPlayer, es, qs, PNODE_ROTATE_AND_MOVE);
 
 	    lightMan->getLight(0)->setParent(trackManager->getTrackNode());
Index: orxonox/trunk/src/world_entities/primitive.cc
===================================================================
--- orxonox/trunk/src/world_entities/primitive.cc	(revision 3677)
+++ 	(revision )
@@ -1,234 +1,0 @@
-
-
-/* 
-   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: Patrick Boenzli
-   co-programmer: 
-*/
-
-
-#include "primitive.h"
-
-#include "stdincl.h"
-#include "world_entity.h"
-#include "model.h"
-#include "vector.h"
-
-using namespace std;
-
-
-
-/**
-   \brief standard constructor
-*/
-Primitive::Primitive (pForm form) : WorldEntity()
-{
-  this->form = form;
-  this->size = 0.2f;
-  this->segments = 6;
-  this->object = gluNewQuadric();
-  
-  gluQuadricNormals(this->object, GLU_SMOOTH); 
-  gluQuadricTexture(this->object, GL_TRUE);
-  
-  this->material = new Material("Sphere");
-  this->material->setIllum(3);
-  this->material->setAmbient(1, .5, 1);
-}
-
-
-/**
-   \brief standard deconstructor
-*/
-Primitive::~Primitive () 
-{
-  delete this->material;
-  free(this->object);
-}
- 
-
-/**
-   \brief sets the form of the primitive body
-   \param form (enumeration) from pForm
-*/
-void Primitive::setForm(pForm form)
-{
-  this->form = form;
-}
-
-
-/**
-   \brief sets the size of the body
-   \param size from [0..1]
-*/
-void Primitive::setSize(float size)
-{
-  if( size < 0 || size > 1)
-    {
-      PRINTF(1)("size must be value between 0 and 1 [0..1]. resetting it to 1\n");
-      size = 1.0;
-    }
-  this->size = size;
-}
-
-
-/**
-   \brief set number of segments
-   \param segment count
-
-   the more segments the body has, the smoother it seems. This function makes only
-   sense with speres and cylinders, cubes have constant number of segments :)
-*/
-void Primitive::setSegments(int segments)
-{
-  if( segments <= 0)
-    {
-      PRINTF(1)("number of segments must be more than 0! not setting segment number\n");
-    }
-  this->segments = segments;
-}
-
-/**
-   \brief stets the material
-   \param material to be set
-*/
-void Primitive::setMaterial(Material* material)
-{
-  if( material == NULL)
-    {
-      PRINTF(1)("material reference is NULL, returning without modifications\n");
-      return;
-    }
-  this->material = material;
-}
-
-
-/**
-   \brief sets the texture name
-   \param path to the texture
-
-   eg: name could have following value: "../data/pictures/load_screen.jpg"
-*/
-void Primitive::setTexture(char* name)
-{
-  if( name == NULL )
-    {
-      PRINTF(1)("texture char reference is NULL, returning without modifications\n");
-      return;
-    }
-  this->textureName = name;
-  this->material->setDiffuseMap( name);
-}
-
-
-/**
-   \brief called, when the object gets hit
-   \param other object, that hits it
-   \param location of impact
-*/
-void Primitive::hit (WorldEntity* weapon, Vector* loc) {}
-
-
-/**
-   \brief object collides
-*/
-void Primitive::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
-
-
-/**
-   \brief tick singal put everything here, that is timedependent
-   \param time in sec
-*/
-inline void Primitive::tick (float time) 
-{
-  // Vector v(0.0, 0.0, 1.0);
-  // Quaternion q(10.0, v);
-  // this->setRelDir(&(this->relDirection * q));
-}
-
-/**
-   \brief drawing function of the object
-*/
-inline void Primitive::draw () 
-{
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-
-  float matrix[4][4];
-  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
-  //rotate
-  //this->getAbsDir().matrix (matrix);
-  //glMultMatrixf((float*)matrix);
-  this->material->select();
-  
-  switch( this->form)
-    {
-    case P_SPHERE:
-      gluSphere(this->object, this->size, this->segments, this->segments);
-      break;
-    case P_CUBE:
-      this->glDrawCube();
-      break;
-    case P_CYLINDER:
-      gluCylinder(this->object, this->size, this->size, this->size * 2, this->segments, this->segments);
-      break;
-    case P_DISK:
-      gluDisk(this->object, this->size, 2, this->segments, this->segments);
-      break;
-    default:
-      break;
-    }
-
-  glPopMatrix();
-}
-
-
-void Primitive::glDrawCube()				
-{
-  glBegin(GL_QUADS);			
-  glNormal3f( 0.0f, 0.0f, 1.0f);	
-  glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-  glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-  glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-  glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
-
-  glNormal3f( 0.0f, 0.0f,-1.0f);	
-  glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-  glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
-  glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
-  glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-
-  glNormal3f( 0.0f, 1.0f, 0.0f);	
-  glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
-  glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
-  glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-  glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
-
-  glNormal3f( 0.0f,-1.0f, 0.0f);
-  glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-  glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-  glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-  glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-
-  glNormal3f( 1.0f, 0.0f, 0.0f);
-  glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-  glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
-  glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-  glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-
-  glNormal3f(-1.0f, 0.0f, 0.0f);
-  glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-  glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-  glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
-  glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
-  glEnd();
-}
Index: orxonox/trunk/src/world_entities/primitive.h
===================================================================
--- orxonox/trunk/src/world_entities/primitive.h	(revision 3677)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*! 
-    \primitive.h
-    \brief representing a primitive body in the world: cube, sphere, cylinder  etc...
-*/
-
-
-#ifndef _PRIMITIVE_H
-#define _PRIMITIVE_H
-
-#include "world_entity.h"
-#include "glincl.h"
-
-typedef enum pForm {P_SPHERE = 0, P_CUBE, P_CYLINDER, P_DISK};
-
-class Material;
-
-class Primitive : public WorldEntity 
-{
-  friend class World;
-
- public:
-  Primitive (pForm form);
-  virtual ~Primitive ();
-
-  void setForm(pForm form);
-  void setSize(float size);
-  void setSegments(int segments);
-  void setMaterial(Material* material);
-  void setTexture(char* name);
-  
-
-  virtual void tick (float time);
-  virtual void hit (WorldEntity* weapon, Vector* loc);
-  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
-  virtual void draw ();
-
-
-
- private:
-  GLUquadricObj* object; //!< the object to be rendered
-  Material* material;    //!< A Material for the SkySphere.
-  pForm form;            //!< the chooesen form for the entity
-  char* textureName;     //!< if there is a texture. this is the name for it
-  float size;            //!< size of the object, from [0..1]
-  int segments;          //!< segment count
-
-  void glDrawCube();
-};
-
-#endif /* _PRIMITIVE_H */
Index: orxonox/trunk/src/world_entities/projectile.cc
===================================================================
--- orxonox/trunk/src/world_entities/projectile.cc	(revision 3677)
+++ orxonox/trunk/src/world_entities/projectile.cc	(revision 3678)
@@ -21,6 +21,5 @@
 #include "world_entity.h"
 #include "null_parent.h"
-#include "objModel.h"
-#include "primitive.h"
+#include "model.h"
 #include "vector.h"
 
