Index: orxonox/trunk/src/Makefile.am
===================================================================
--- orxonox/trunk/src/Makefile.am	(revision 4414)
+++ orxonox/trunk/src/Makefile.am	(revision 4415)
@@ -101,4 +101,5 @@
 		 lib/graphics/particles/particle_system.cc \
 		 lib/graphics/particles/particle_emitter.cc \
+		 lib/graphics/particles/quick_animation.cc \
 		 lib/lang/base_object.cc \
 		 lib/util/ini_parser.cc \
@@ -179,4 +180,5 @@
 		 lib/graphics/particles/particle_system.h \
 		 lib/graphics/particles/particle_emitter.h \
+		 lib/graphics/particles/quick_animation.h \
 		 lib/lang/base_object.h \
 		 util/common/list.h \
Index: orxonox/trunk/src/Makefile.in
===================================================================
--- orxonox/trunk/src/Makefile.in	(revision 4414)
+++ orxonox/trunk/src/Makefile.in	(revision 4415)
@@ -74,6 +74,7 @@
 	material.$(OBJEXT) texture.$(OBJEXT) particle_engine.$(OBJEXT) \
 	particle_system.$(OBJEXT) particle_emitter.$(OBJEXT) \
-	base_object.$(OBJEXT) ini_parser.$(OBJEXT) substring.$(OBJEXT) \
-	vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
+	quick_animation.$(OBJEXT) base_object.$(OBJEXT) \
+	ini_parser.$(OBJEXT) substring.$(OBJEXT) vector.$(OBJEXT) \
+	curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
 	benchmark.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
@@ -112,4 +113,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/primitive_model.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/projectile.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/quick_animation.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/satellite.Po ./$(DEPDIR)/skybox.Po \
@@ -315,4 +317,5 @@
 		 lib/graphics/particles/particle_system.cc \
 		 lib/graphics/particles/particle_emitter.cc \
+		 lib/graphics/particles/quick_animation.cc \
 		 lib/lang/base_object.cc \
 		 lib/util/ini_parser.cc \
@@ -393,4 +396,5 @@
 		 lib/graphics/particles/particle_system.h \
 		 lib/graphics/particles/particle_emitter.h \
+		 lib/graphics/particles/quick_animation.h \
 		 lib/lang/base_object.h \
 		 util/common/list.h \
@@ -527,4 +531,5 @@
 @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)/quick_animation.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/satellite.Po@am__quote@
@@ -1394,4 +1399,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 particle_emitter.obj `if test -f 'lib/graphics/particles/particle_emitter.cc'; then $(CYGPATH_W) 'lib/graphics/particles/particle_emitter.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/particles/particle_emitter.cc'; fi`
+
+quick_animation.o: lib/graphics/particles/quick_animation.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT quick_animation.o -MD -MP -MF "$(DEPDIR)/quick_animation.Tpo" -c -o quick_animation.o `test -f 'lib/graphics/particles/quick_animation.cc' || echo '$(srcdir)/'`lib/graphics/particles/quick_animation.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/quick_animation.Tpo" "$(DEPDIR)/quick_animation.Po"; else rm -f "$(DEPDIR)/quick_animation.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/particles/quick_animation.cc' object='quick_animation.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/quick_animation.Po' tmpdepfile='$(DEPDIR)/quick_animation.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 quick_animation.o `test -f 'lib/graphics/particles/quick_animation.cc' || echo '$(srcdir)/'`lib/graphics/particles/quick_animation.cc
+
+quick_animation.obj: lib/graphics/particles/quick_animation.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT quick_animation.obj -MD -MP -MF "$(DEPDIR)/quick_animation.Tpo" -c -o quick_animation.obj `if test -f 'lib/graphics/particles/quick_animation.cc'; then $(CYGPATH_W) 'lib/graphics/particles/quick_animation.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/particles/quick_animation.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/quick_animation.Tpo" "$(DEPDIR)/quick_animation.Po"; else rm -f "$(DEPDIR)/quick_animation.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/particles/quick_animation.cc' object='quick_animation.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/quick_animation.Po' tmpdepfile='$(DEPDIR)/quick_animation.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 quick_animation.obj `if test -f 'lib/graphics/particles/quick_animation.cc'; then $(CYGPATH_W) 'lib/graphics/particles/quick_animation.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/particles/quick_animation.cc'; fi`
 
 base_object.o: lib/lang/base_object.cc
Index: orxonox/trunk/src/lib/graphics/particles/quick_animation.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/particles/quick_animation.cc	(revision 4415)
+++ orxonox/trunk/src/lib/graphics/particles/quick_animation.cc	(revision 4415)
@@ -0,0 +1,120 @@
+/* 
+   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: ...
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "quick_animation.h"
+
+#include "compiler.h"
+#include "debug.h"
+#ifndef NULL
+#define NULL 0
+#endif
+
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+QuickAnimation::QuickAnimation (float rangeStart, float valueStart, float rangeEnd, float valueEnd)
+{
+   this->setClassName("QuickAnimation");
+
+   this->first = this->current = new QuickKeyFrame;
+   this->current->positionStart = rangeStart;
+   this->current->positionEnd = rangeEnd;
+   this->current->valueStart = valueStart;
+   this->current->valueEnd = valueEnd;
+   this->current->next = NULL;
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+QuickAnimation::~QuickAnimation () 
+{
+  this->current = this->first;
+  QuickKeyFrame delKF;
+  
+  while (this->current != NULL)
+    {
+      this->first = this->current->next;
+      delete this->current;
+      this->current = this->first;
+    }
+
+}
+
+
+void QuickAnimation::addEntry(float position, float value)
+{
+  this->current = this->first;
+  if (position < this->current->positionStart)
+    {
+      this->current = new QuickKeyFrame;
+
+      this->current->positionStart = position;
+      this->current->positionEnd = this->first->positionStart;
+
+      this->current->valueStart = value;
+      this->current->valueEnd = this->first->valueStart;
+      
+      this->current->next = this->first;
+      this->first = this->current;
+    }
+  
+  while(this->current != NULL)
+    {
+      if (this->current->positionStart < position)
+	{
+	  QuickKeyFrame* tmpKey = new QuickKeyFrame;
+	  tmpKey->positionStart = position;
+	  tmpKey->positionEnd = this->current->positionEnd;
+	  tmpKey->valueStart = value;
+	  tmpKey->valueEnd = this->current->valueEnd;
+	  tmpKey->next = this->current->next;
+	  
+	  this->current->positionEnd = tmpKey->positionStart;
+	  this->current->valueEnd = tmpKey->valueStart;
+	}
+    }
+}
+
+
+float QuickAnimation::getValue(float position)
+{
+  while (likely (this->current->positionStart > position || this->current->positionEnd < position))
+    {
+      if (likely(this->current->next != NULL))
+	this->current = this->current->next;
+      else
+	{
+	  if (unlikely(this->first->positionStart > position))
+	    {
+	      PRINTF(2)("Position out of range. chose %f, min is: %f, max is\n", position, this->first->positionStart, this->current->positionEnd);
+	      return 0;
+	    }
+	  this->current = this->first;
+	}
+    }
+  return this->current->valueStart + (this->current->positionEnd - position) *
+    (this->current->valueEnd - this->current->valueStart) /
+    (this->current->positionEnd - this->current->positionStart);
+}
+
Index: orxonox/trunk/src/lib/graphics/particles/quick_animation.h
===================================================================
--- orxonox/trunk/src/lib/graphics/particles/quick_animation.h	(revision 4415)
+++ orxonox/trunk/src/lib/graphics/particles/quick_animation.h	(revision 4415)
@@ -0,0 +1,51 @@
+/*! 
+    \file quick_animation.h
+    \brief Definition of the QuickAnimation-class
+
+*/
+
+#ifndef _QUICK_ANIMATION_H
+#define _QUICK_ANIMATION_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION
+
+
+
+
+//! A class for that linearely interpolates between multiple values.
+/**
+   to be quick this only has the capability to store very little date
+
+   this class is optimized for a raising value. eg. 100 particles sorted
+   by age.
+*/
+class QuickAnimation : public BaseObject {
+
+ public:
+  //! a simple struct that stores keyframes for the QuickAnimation-Class.
+  struct QuickKeyFrame
+  {
+    float valueStart;       //!< The starting value of this KeyFrame
+    float valueEnd;         //!< The end value of this KeyFrame
+    float positionStart;    //!< The starting position of this KeyFrame
+    float positionEnd;      //!< The end position of thies KeyFrame
+
+    QuickKeyFrame* next;    //!< The next Animation
+  };
+
+  QuickAnimation(float rangeStart = 0.0, float valueStart = 0.0, float rangeEnd = 1.0, float valueEnd = 0.0);
+  virtual ~QuickAnimation();
+
+  void addEntry(float position, float value);
+
+  float getValue(float position);
+
+ private:
+  QuickKeyFrame* first;
+  QuickKeyFrame* current;
+
+};
+
+#endif /* _QUICK_ANIMATION_H */
