Index: /orxonox/branches/physics/src/Makefile.am
===================================================================
--- /orxonox/branches/physics/src/Makefile.am	(revision 4292)
+++ /orxonox/branches/physics/src/Makefile.am	(revision 4293)
@@ -60,4 +60,5 @@
 		 util/loading/factory.cc \
 		 util/loading/load_param.cc \
+		 util/state.cc \
 		 story_entities/story_entity.cc \
 		 story_entities/campaign.cc \
@@ -116,4 +117,5 @@
 		 util/object_manager.h \
 		 util/garbage_collector.h \
+		 util/state.h \
 		 story_entities/story_entity.h \
 		 story_entities/story_def.h \
Index: /orxonox/branches/physics/src/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/Makefile.in	(revision 4292)
+++ /orxonox/branches/physics/src/Makefile.in	(revision 4293)
@@ -60,9 +60,9 @@
 	garbage_collector.$(OBJEXT) list.$(OBJEXT) \
 	resource_manager.$(OBJEXT) factory.$(OBJEXT) \
-	load_param.$(OBJEXT) story_entity.$(OBJEXT) campaign.$(OBJEXT) \
-	world.$(OBJEXT) world_entity.$(OBJEXT) camera.$(OBJEXT) \
-	player.$(OBJEXT) environment.$(OBJEXT) skysphere.$(OBJEXT) \
-	skybox.$(OBJEXT) terrain.$(OBJEXT) weapon.$(OBJEXT) \
-	projectile.$(OBJEXT) satellite.$(OBJEXT) \
+	load_param.$(OBJEXT) state.$(OBJEXT) story_entity.$(OBJEXT) \
+	campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \
+	camera.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \
+	skysphere.$(OBJEXT) skybox.$(OBJEXT) terrain.$(OBJEXT) \
+	weapon.$(OBJEXT) projectile.$(OBJEXT) satellite.$(OBJEXT) \
 	character_attributes.$(OBJEXT) test_gun.$(OBJEXT) \
 	test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \
@@ -112,5 +112,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/satellite.Po ./$(DEPDIR)/skybox.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po ./$(DEPDIR)/state.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/substring.Po ./$(DEPDIR)/terrain.Po \
@@ -274,4 +274,5 @@
 		 util/loading/factory.cc \
 		 util/loading/load_param.cc \
+		 util/state.cc \
 		 story_entities/story_entity.cc \
 		 story_entities/campaign.cc \
@@ -330,4 +331,5 @@
 		 util/object_manager.h \
 		 util/garbage_collector.h \
+		 util/state.h \
 		 story_entities/story_entity.h \
 		 story_entities/story_def.h \
@@ -512,4 +514,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skybox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substring.Po@am__quote@
@@ -750,4 +753,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 load_param.obj `if test -f 'util/loading/load_param.cc'; then $(CYGPATH_W) 'util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/util/loading/load_param.cc'; fi`
+
+state.o: util/state.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.o -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.o `test -f 'util/state.cc' || echo '$(srcdir)/'`util/state.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/state.cc' object='state.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.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 state.o `test -f 'util/state.cc' || echo '$(srcdir)/'`util/state.cc
+
+state.obj: util/state.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.obj -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='util/state.cc' object='state.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.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 state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi`
 
 story_entity.o: story_entities/story_entity.cc
Index: /orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc
===================================================================
--- /orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc	(revision 4292)
+++ /orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc	(revision 4293)
@@ -20,12 +20,14 @@
 #include "particle_emitter.h"
 #include "particle_engine.h"
+
+#include "field.h"
+
 #include "compiler.h"
 #include "material.h"
-
-#include "field.h"
+#include "state.h"
+
 
 // needed to find the Position of the Camera
 #include "world.h"
-#include "camera.h"
 
 using namespace std;
@@ -337,7 +339,7 @@
 	  //! \todo implement a faster code for the look-at Camera algorithm.
 
-	  Camera* camera = WorldInterface::getInstance()->getCurrentWorld()->getLocalCamera();  //!< \todo MUST be different
+	  const PNode* camera = State::getInstance()->getCamera();  //!< \todo MUST be different
 	  Vector cameraPos = camera->getAbsCoor();
-	  Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
+	  Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor();
 	  Vector view = cameraTargetPos - cameraPos;
 	  Vector up = Vector(0, 1, 0);
Index: /orxonox/branches/physics/src/story_entities/world.cc
===================================================================
--- /orxonox/branches/physics/src/story_entities/world.cc	(revision 4292)
+++ /orxonox/branches/physics/src/story_entities/world.cc	(revision 4293)
@@ -21,4 +21,6 @@
 
 #include "orxonox.h"
+
+#include "state.h"
 
 #include "p_node.h"
@@ -203,4 +205,6 @@
   this->debugWorldNr = worldID;
   this->entities = new tList<WorldEntity>();
+  
+  State::getInstance();
 }
 
@@ -282,5 +286,7 @@
   this->localCamera = new Camera();
   this->localCamera->setName ("camera");
-  
+
+  State::getInstance()->setCamera(this->localCamera, this->localCamera->getTarget());
+
   GraphicsEngine::getInstance()->displayFPS(true);
 }
Index: /orxonox/branches/physics/src/subprojects/particles/Makefile.am
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/Makefile.am	(revision 4292)
+++ /orxonox/branches/physics/src/subprojects/particles/Makefile.am	(revision 4293)
@@ -14,4 +14,6 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/math
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics/fields
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/tinyxml
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/defs
@@ -30,8 +32,13 @@
 AM_LDFLAGS=$(MWINDOWS)
 
-bin_PROGRAMS=importer
+bin_PROGRAMS = particles
 
+particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a
 
-importer_SOURCES= framework.cc \
+particles_SOURCES= framework.cc \
+		  $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc \
+		  $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \
+		  $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc \
+		  $(MAINSRCDIR)/util/state.cc \
 	  	  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
 		  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
@@ -48,3 +55,3 @@
 		  $(MAINSRCDIR)/lib/coord/null_parent.cc
 
-noinst_HEADERS = framework.h 
+noinst_HEADERS = framework.h
Index: /orxonox/branches/physics/src/subprojects/particles/Makefile.in
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/Makefile.in	(revision 4292)
+++ /orxonox/branches/physics/src/subprojects/particles/Makefile.in	(revision 4293)
@@ -16,5 +16,5 @@
 
 
-SOURCES = $(importer_SOURCES)
+SOURCES = $(particles_SOURCES)
 
 srcdir = @srcdir@
@@ -39,5 +39,5 @@
 POST_UNINSTALL = :
 host_triplet = @host@
-bin_PROGRAMS = importer$(EXEEXT)
+bin_PROGRAMS = particles$(EXEEXT)
 subdir = src/subprojects/particles
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
@@ -53,12 +53,14 @@
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am_importer_OBJECTS = framework.$(OBJEXT) model.$(OBJEXT) \
-	objModel.$(OBJEXT) primitive_model.$(OBJEXT) array.$(OBJEXT) \
-	material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \
+am_particles_OBJECTS = framework.$(OBJEXT) particle_engine.$(OBJEXT) \
+	particle_system.$(OBJEXT) particle_emitter.$(OBJEXT) \
+	state.$(OBJEXT) model.$(OBJEXT) objModel.$(OBJEXT) \
+	primitive_model.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \
+	texture.$(OBJEXT) graphics_engine.$(OBJEXT) \
 	base_object.$(OBJEXT) vector.$(OBJEXT) \
 	resource_manager.$(OBJEXT) text_engine.$(OBJEXT) \
 	p_node.$(OBJEXT) null_parent.$(OBJEXT)
-importer_OBJECTS = $(am_importer_OBJECTS)
-importer_LDADD = $(LDADD)
+particles_OBJECTS = $(am_particles_OBJECTS)
+particles_DEPENDENCIES = $(MAINSRCDIR)/lib/physics/libORXphysics.a
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -71,8 +73,11 @@
 @AMDEP_TRUE@	./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/p_node.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/particle_emitter.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/particle_engine.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/particle_system.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/vector.Po
+@AMDEP_TRUE@	./$(DEPDIR)/state.Po ./$(DEPDIR)/text_engine.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -80,6 +85,6 @@
 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
-SOURCES = $(importer_SOURCES)
-DIST_SOURCES = $(importer_SOURCES)
+SOURCES = $(particles_SOURCES)
+DIST_SOURCES = $(particles_SOURCES)
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
@@ -195,7 +200,12 @@
 target_vendor = @target_vendor@
 MAINSRCDIR = ../..
-AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/tinyxml -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects
+AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/physics -I$(MAINSRCDIR)/lib/physics/fields -I$(MAINSRCDIR)/lib/tinyxml -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects
 AM_LDFLAGS = $(MWINDOWS)
-importer_SOURCES = framework.cc \
+particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a
+particles_SOURCES = framework.cc \
+		  $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc \
+		  $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \
+		  $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc \
+		  $(MAINSRCDIR)/util/state.cc \
 	  	  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
 		  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
@@ -212,5 +222,5 @@
 		  $(MAINSRCDIR)/lib/coord/null_parent.cc
 
-noinst_HEADERS = framework.h 
+noinst_HEADERS = framework.h
 all: all-am
 
@@ -269,7 +279,7 @@
 clean-binPROGRAMS:
 	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-importer$(EXEEXT): $(importer_OBJECTS) $(importer_DEPENDENCIES) 
-	@rm -f importer$(EXEEXT)
-	$(CXXLINK) $(importer_LDFLAGS) $(importer_OBJECTS) $(importer_LDADD) $(LIBS)
+particles$(EXEEXT): $(particles_OBJECTS) $(particles_DEPENDENCIES) 
+	@rm -f particles$(EXEEXT)
+	$(CXXLINK) $(particles_LDFLAGS) $(particles_OBJECTS) $(particles_LDADD) $(LIBS)
 
 mostlyclean-compile:
@@ -288,6 +298,10 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_emitter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_engine.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_system.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)/state.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
@@ -309,4 +323,68 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+particle_engine.o: $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_engine.o -MD -MP -MF "$(DEPDIR)/particle_engine.Tpo" -c -o particle_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particle_engine.Tpo" "$(DEPDIR)/particle_engine.Po"; else rm -f "$(DEPDIR)/particle_engine.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' object='particle_engine.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particle_engine.Po' tmpdepfile='$(DEPDIR)/particle_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 particle_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc
+
+particle_engine.obj: $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_engine.obj -MD -MP -MF "$(DEPDIR)/particle_engine.Tpo" -c -o particle_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particle_engine.Tpo" "$(DEPDIR)/particle_engine.Po"; else rm -f "$(DEPDIR)/particle_engine.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' object='particle_engine.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particle_engine.Po' tmpdepfile='$(DEPDIR)/particle_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 particle_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; fi`
+
+particle_system.o: $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_system.o -MD -MP -MF "$(DEPDIR)/particle_system.Tpo" -c -o particle_system.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particle_system.Tpo" "$(DEPDIR)/particle_system.Po"; else rm -f "$(DEPDIR)/particle_system.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' object='particle_system.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particle_system.Po' tmpdepfile='$(DEPDIR)/particle_system.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 particle_system.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc
+
+particle_system.obj: $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_system.obj -MD -MP -MF "$(DEPDIR)/particle_system.Tpo" -c -o particle_system.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particle_system.Tpo" "$(DEPDIR)/particle_system.Po"; else rm -f "$(DEPDIR)/particle_system.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' object='particle_system.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particle_system.Po' tmpdepfile='$(DEPDIR)/particle_system.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 particle_system.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; fi`
+
+particle_emitter.o: $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_emitter.o -MD -MP -MF "$(DEPDIR)/particle_emitter.Tpo" -c -o particle_emitter.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particle_emitter.Tpo" "$(DEPDIR)/particle_emitter.Po"; else rm -f "$(DEPDIR)/particle_emitter.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' object='particle_emitter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particle_emitter.Po' tmpdepfile='$(DEPDIR)/particle_emitter.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 particle_emitter.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc
+
+particle_emitter.obj: $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_emitter.obj -MD -MP -MF "$(DEPDIR)/particle_emitter.Tpo" -c -o particle_emitter.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/particle_emitter.Tpo" "$(DEPDIR)/particle_emitter.Po"; else rm -f "$(DEPDIR)/particle_emitter.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' object='particle_emitter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/particle_emitter.Po' tmpdepfile='$(DEPDIR)/particle_emitter.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 particle_emitter.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; fi`
+
+state.o: $(MAINSRCDIR)/util/state.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.o -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/util/state.cc' object='state.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.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 state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc
+
+state.obj: $(MAINSRCDIR)/util/state.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.obj -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/util/state.cc' object='state.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.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 state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`
 
 model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc
Index: /orxonox/branches/physics/src/subprojects/particles/framework.cc
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4292)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.cc	(revision 4293)
@@ -16,7 +16,7 @@
 #include "framework.h"
 
-#include "vector.h"
-
-#include "primitive_model.h"
+#include "physics_engine.h"
+#include "particle_engine.h"
+
 #include "debug.h"
 #include "graphics_engine.h"
@@ -25,14 +25,22 @@
 
 int verbose;
-void DrawGLScene()
-{
-  currFrame = SDL_GetTicks();
-  dt = currFrame - lastFrame; 
-  if (dt == 0)
-    dist += (zoomTo-dist)/500;
-  else 
-    dist += (zoomTo-dist)/500 *(float)dt;
-
-  rotatorP += rotatorV *(float)dt;
+
+bool mainLoop()
+{
+  while(true)
+    {
+      if (!keyHandler())
+	return false;
+
+      // Draw the scene
+      draw();
+      
+    }
+
+}
+
+
+bool draw()
+{
   
 
@@ -45,80 +53,30 @@
     gluLookAt (0, dist , dist, 0,0,0, up.x,up.y,up.z);
 
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-  //  glRotatef (180, dir.x, dir.y, dir.z);
-  glMultMatrixf (*matQ);
-  if (obj)
-    obj->draw();
-
-  glPopMatrix();
+
 
   SDL_GL_SwapBuffers(); // Swap the buffers
+
+}
+bool tick()
+{
+  currFrame = SDL_GetTicks();
+  float dt = (float)(currFrame - lastFrame) /1000.0;
+  if (dt == 0)
+    dist += (zoomTo-dist);
+  else 
+    dist += (zoomTo-dist) *(float)dt;
+  rotatorP += rotatorV *(float)dt;
+
+  ParticleEngine::getInstance()->tick(dt);
+
   lastFrame = currFrame;
-}
-
-
-int main(int argc, char *argv[])
-{
-  verbose = 3;
-
-  Uint8* keys; // This variable will be used in the keyboard routine
-  int done = false; // We aren't done yet, are we?
-
-  // Create a new OpenGL window with the title "Cone3D Basecode" at
-  // 640x480x32, fullscreen and check for errors along the way
-  GraphicsEngine::getInstance();
-
-  if (argc>=3)
-    obj = new OBJModel (argv[1], atof(argv[2]));
-  else if (argc>=2)
-    obj = new OBJModel(argv[1]);
-  else 
-    obj = new PrimitiveModel(CYLINDER);
-
-  M = Vector(GraphicsEngine::getInstance()->getResolutionY()/2, GraphicsEngine::getInstance()->getResolutionX()/2, 0); 
-  rotAxis = Vector (0.0,1.0,0.0);
-  rotAngle = 0;
-
-  matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1;
-  rotQ = Quaternion (rotAngle, rotAxis);
-  rotQlast = rotQ;
-  dir = Vector (0.0, 0.0, 1.0);
-  up = Vector (0.0, 1.0, 0.0);
-
-  glEnable(GL_LIGHTING);
-  glEnable(GL_DEPTH_TEST);
-
-  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
-  GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0};
-  GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0};
-  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
-
-  glEnable(GL_LIGHT0);
-  glLightfv(GL_LIGHT0, GL_POSITION, light0Position);
-  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
-  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
-  
-  glEnable(GL_LIGHT1);
-  glLightfv(GL_LIGHT1, GL_POSITION, light1Position);
-  glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight);
-  glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight);
-  
-
-  glEnable(GL_TEXTURE_2D);
-  rotatorP = .0;
-  rotatorV = .0;
-  dist = 5.0;
-  zoomTo = dist;
-  // Build the font from a TGA image font.tga in the data directory
-  // Hide the mouse cursor
-    SDL_ShowCursor(2);
-    mouse1Down = false;
-
+ 
+}
+
+
+bool keyHandler()
+{
   // This is the main loop for the entire program and it will run until done==TRUE
-  while(!done)
   {
-    // Draw the scene
-    DrawGLScene();
     // And poll for events
     SDL_Event event;
@@ -210,10 +168,8 @@
 	  {
 	  case SDLK_x:
-	    delete obj;
-	    obj = NULL;
+
 	    break;
 	  case SDLK_c:
-	    if (!obj)
-	      obj = new OBJModel(argv[1]);
+
 	    break;
 	  case SDLK_a:
@@ -229,10 +185,9 @@
       case SDL_QUIT:
 	// then we're done and we'll end this program
-          done=true;
-          break;
+	return false;
+	break;
       default:
-          break;
+	break;
       }
-
 
     }
@@ -242,10 +197,64 @@
 
     // and check if ESCAPE has been pressed. If so then quit
-    if(keys[SDLK_ESCAPE]) done=true;
+    if(keys[SDLK_ESCAPE]) return false;
   }
-
+  return true;
+}
+
+
+int main(int argc, char *argv[])
+{
+  verbose = 3;
+
+
+  // Create a new OpenGL window with the title "Cone3D Basecode" at
+  // 640x480x32, fullscreen and check for errors along the way
+  GraphicsEngine::getInstance();
+
+  
+
+  M = Vector(GraphicsEngine::getInstance()->getResolutionY()/2, GraphicsEngine::getInstance()->getResolutionX()/2, 0); 
+  rotAxis = Vector (0.0,1.0,0.0);
+  rotAngle = 0;
+
+  matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1;
+  rotQ = Quaternion (rotAngle, rotAxis);
+  rotQlast = rotQ;
+  dir = Vector (0.0, 0.0, 1.0);
+  up = Vector (0.0, 1.0, 0.0);
+
+  glEnable(GL_LIGHTING);
+  glEnable(GL_DEPTH_TEST);
+
+  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
+  GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0};
+  GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0};
+  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
+
+  glEnable(GL_LIGHT0);
+  glLightfv(GL_LIGHT0, GL_POSITION, light0Position);
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
+  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
+  
+  glEnable(GL_LIGHT1);
+  glLightfv(GL_LIGHT1, GL_POSITION, light1Position);
+  glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight);
+  glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight);
+  
+
+  glEnable(GL_TEXTURE_2D);
+  rotatorP = .0;
+  rotatorV = .0;
+  dist = 5.0;
+  zoomTo = dist;
+  // Build the font from a TGA image font.tga in the data directory
+  // Hide the mouse cursor
+  SDL_ShowCursor(2);
+  mouse1Down = false;
+
+  mainLoop();
+    
   // Kill the GL & SDL screens
-  if (obj)
-    delete obj;
+
   delete GraphicsEngine::getInstance();
   // And quit
Index: /orxonox/branches/physics/src/subprojects/particles/framework.h
===================================================================
--- /orxonox/branches/physics/src/subprojects/particles/framework.h	(revision 4292)
+++ /orxonox/branches/physics/src/subprojects/particles/framework.h	(revision 4293)
@@ -2,6 +2,6 @@
 #define _FRAMEWORK_H
  
-#include "objModel.h"
 #include "vector.h"
+#include "glincl.h"
 
 float rotatorP;
@@ -13,6 +13,4 @@
 Uint32 lastFrame;
 Uint32 currFrame;
-Uint32 dt;
-
 
 Vector dir;
@@ -29,8 +27,11 @@
 Quaternion rotQlast;
 
+Uint8* keys; // This variable will be used in the keyboard routine
 bool mouse1Down;
 
-Model* obj;
-
+bool mainLoop();
+bool draw();
+bool tick();
+bool keyHandler();
 
 #endif /* _FRAMEWORK_H */
Index: /orxonox/branches/physics/src/util/state.cc
===================================================================
--- /orxonox/branches/physics/src/util/state.cc	(revision 4293)
+++ /orxonox/branches/physics/src/util/state.cc	(revision 4293)
@@ -0,0 +1,66 @@
+/* 
+   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_ENTITY
+
+#include "state.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+State::State () 
+{
+   this->setClassName ("State");
+
+   this->camera = NULL;
+   this->cameraTarget = NULL;
+}
+
+/**
+   \brief the singleton reference to this class
+*/
+State* State::singletonRef = NULL;
+
+/**
+   \returns a Pointer to this Class
+*/
+State* State::getInstance(void)
+{
+  if (!State::singletonRef)
+    State::singletonRef = new State();
+  return State::singletonRef;
+}
+
+/**
+   \brief standard deconstructor
+
+*/
+State::~State () 
+{
+  State::singletonRef = NULL;
+
+}
+
+/**
+   \sets camera and target of the current Camera
+*/
+void State::setCamera(const PNode* camera, const PNode* cameraTarget)
+{
+  this->camera = camera;
+  this->cameraTarget = cameraTarget;
+}
Index: /orxonox/branches/physics/src/util/state.h
===================================================================
--- /orxonox/branches/physics/src/util/state.h	(revision 4293)
+++ /orxonox/branches/physics/src/util/state.h	(revision 4293)
@@ -0,0 +1,34 @@
+/*! 
+    \file proto_singleton.h
+    \brief Definition of the States-singleton Class
+    
+*/
+
+#ifndef _STATE_H
+#define _STATE_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION
+class PNode;
+
+//! A Singleton class, that handles some states about orxonox's objects
+class State : public BaseObject {
+
+ public:
+  static State* getInstance(void);
+  virtual ~State(void);
+
+  void setCamera(const PNode* camera, const PNode* cameraTarget);
+  const PNode* getCamera(void) const { return this->camera; };
+  const PNode* getCameraTarget(void) const { return this->cameraTarget; };
+
+ private:
+  State(void);
+  static State* singletonRef;
+
+  const PNode* camera;
+  const PNode* cameraTarget;
+};
+
+#endif /* _STATE_H */
