Index: /orxonox/trunk/src/animation.h
===================================================================
--- /orxonox/trunk/src/animation.h	(revision 3831)
+++ /orxonox/trunk/src/animation.h	(revision 3832)
@@ -29,4 +29,6 @@
 #include "list.h"
 // FORWARD DEFINITION
+
+#define DELTA_X 0.05  //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta
 
 typedef enum ANIM_FUNCTION {ANIM_CONSTANT,
@@ -146,4 +148,5 @@
 
  private:
+  float expFactor;
   T* object;
   void (T::*funcToAnim)(float);
@@ -258,5 +261,6 @@
 		break;
 	      }
-	  this->currentKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
+	  //this->currentKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
+	  this->currentKeyFrame = this->nextKeyFrame;
 	  this->nextKeyFrame = this->keyFrameList->nextElement(this->nextKeyFrame);
 	  printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
@@ -291,6 +295,10 @@
       break;
     case ANIM_NEG_EXP:
-      this->animFunc = &tAnim<T>::negExp;
-      break;
+      {
+	this->animFunc = &tAnim<T>::negExp;
+	float d = fabs(this->currentKeyFrame->value - this->nextKeyFrame->value);
+	expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
+	break;
+      }
     case ANIM_QUADRATIC:
       this->animFunc = &tAnim<T>::quadratic;
@@ -319,5 +327,5 @@
 float tAnim<T>::linear(float timePassed) const 
 {
-  return this->nextKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value) 
+  return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value) 
     * (timePassed / this->currentKeyFrame->duration);
   //  PRINTF(0)("value is %f, %p %p\n", val, this->currentKeyFrame, this->nextKeyFrame);
@@ -330,23 +338,27 @@
   float d = this->currentKeyFrame->value - this->nextKeyFrame->value;
   float e = 0.5 * d * (1 - cos(M_PI * timePassed / this->currentKeyFrame->duration));
-  //printf("d=%f, t=%f, T=%f\n", d, timePassed, this->currentKeyFrame->duration);
+  return this->currentKeyFrame->value - e;
+  /*
+  return his->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
+    * sin(timePassed / this->currentKeyFrame->duration * M_PI);
+  */
+}
+
+template<class T>
+float tAnim<T>::cosine(float timePassed) const
+{
+  float d = this->currentKeyFrame->value - this->nextKeyFrame->value;
+  float e = 0.5 * d * (sin(M_PI * timePassed / this->currentKeyFrame->duration));
+  if( timePassed > 0.5*this->currentKeyFrame->duration) e = (d - e);
   return this->currentKeyFrame->value - e;
   /*
   return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
-    * sin(timePassed / this->currentKeyFrame->duration * M_PI);
+    * cos(timePassed / this->currentKeyFrame->duration * M_PI);
   */
 }
 
 template<class T>
-float tAnim<T>::cosine(float timePassed) const
-{
-  return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
-    * cos(timePassed / this->currentKeyFrame->duration * M_PI);
-}
-
-template<class T>
 float tAnim<T>::exp(float timePassed) const
 {
-
 }
 
@@ -354,5 +366,7 @@
 float tAnim<T>::negExp(float timePassed) const
 {
-
+  float d = this->currentKeyFrame->value - this->nextKeyFrame->value;
+  float e = d * (1.0 - expf(- timePassed * expFactor));
+  return  this->currentKeyFrame->value - e;
 }
 
Index: /orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- /orxonox/trunk/src/lib/coord/p_node.cc	(revision 3831)
+++ /orxonox/trunk/src/lib/coord/p_node.cc	(revision 3832)
@@ -522,4 +522,5 @@
 {
   //this->tick (dt);
+  /*
   PNode* pn = this->children->enumerate();
   while( pn != NULL) 
@@ -528,4 +529,5 @@
       pn = this->children->nextElement();
     } 
+  */
 }
 
Index: /orxonox/trunk/src/lib/util/list.h
===================================================================
--- /orxonox/trunk/src/lib/util/list.h	(revision 3831)
+++ /orxonox/trunk/src/lib/util/list.h	(revision 3832)
@@ -110,5 +110,5 @@
   bool isEmpty();
   int getSize();
-  T* enumerate();
+  //T* enumerate();
   tIterator<T>* getIterator();
   T* nextElement();
@@ -170,21 +170,17 @@
 inline void tList<T>::remove(T* entity)
 {
-  //__UNLIKELY( entity == NULL) return;
   this->currentEl = this->first;
   listElement<T>* te;
   while( this->currentEl != NULL)
     {
-      if( this->currentEl->curr == entity)
+      __UNLIKELY_IF( this->currentEl->curr == entity)
 	{ 
-	  if( this->currentEl->prev  == NULL ) this->first = this->currentEl->next;
+	  __UNLIKELY_IF( this->currentEl->prev  == NULL ) this->first = this->currentEl->next;
 	  else this->currentEl->prev->next = this->currentEl->next;
 
-	  if( this->currentEl->next == NULL) this->last = this->currentEl->prev;
+	  __UNLIKELY_IF( this->currentEl->next == NULL) this->last = this->currentEl->prev;
 	  else this->currentEl->next->prev = this->currentEl->prev;
 
-	  //te = this->currentEl->next;  // for what am i doing this?
 	  delete this->currentEl;
-	  //this->currentEl = te;
-	  this->currentEl = NULL;
 	  this->size--;
 	  return;
@@ -218,4 +214,5 @@
 }
 
+
 template<class T>
 inline T* tList<T>::lastElement()
@@ -240,4 +237,5 @@
 
 /* deprecated */
+/*
 template<class T>
 T* tList<T>::enumerate()
@@ -248,5 +246,5 @@
   return this->currentEl->curr;
 }
-
+*/
 
 template<class T>
Index: /orxonox/trunk/src/simple_animation.cc
===================================================================
--- /orxonox/trunk/src/simple_animation.cc	(revision 3831)
+++ /orxonox/trunk/src/simple_animation.cc	(revision 3832)
@@ -355,5 +355,5 @@
 	    case NEG_EXP:
 	      *anim->tmpVect = *anim->currentFrame->position - *anim->lastFrame->position;
-	      *anim->tmpVect = *anim->tmpVect * (1 - exp(- anim->localTime * anim->deltaT));     
+	      *anim->tmpVect = *anim->tmpVect * (1 - expf(- anim->localTime * anim->deltaT));     
 	      anim->currentFrame->object->setRelCoor(*anim->lastFrame->position + *anim->tmpVect);
 	      *anim->lastPosition = *anim->tmpVect;
Index: /orxonox/trunk/src/story_entities/campaign.cc
===================================================================
--- /orxonox/trunk/src/story_entities/campaign.cc	(revision 3831)
+++ /orxonox/trunk/src/story_entities/campaign.cc	(revision 3832)
@@ -212,6 +212,6 @@
 
 
-
-  StoryEntity* entity = this->entities->enumerate();
+  tIterator<StoryEntity>* iterator = this->entities->getIterator();
+  StoryEntity* entity = iterator->nextElement();
   while( entity != NULL) 
     { 
@@ -223,7 +223,7 @@
 	  return entity;
 	}
-      entity = this->entities->nextElement();
-    }
-
+      entity = iterator->nextElement();
+    }
+  delete iterator;
 
 
Index: /orxonox/trunk/src/story_entities/world.cc
===================================================================
--- /orxonox/trunk/src/story_entities/world.cc	(revision 3831)
+++ /orxonox/trunk/src/story_entities/world.cc	(revision 3832)
@@ -374,14 +374,24 @@
 
 	    this->testText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0);
-	    testText->setText("TEXT  rocks");
+	    testText->setText("We've got Hostiles!");
 	    testText->setBlending(1.0);
 	    testText->setBindNode(tn);
 
-	    aTest* test = new aTest();
-	    tAnim<aTest>* testAnim = new tAnim<aTest>(test, &aTest::littleDebug);
+	    //aTest* test = new aTest();
+	    //tAnim<aTest>* testAnim = new tAnim<aTest>(test, &aTest::littleDebug);
+	    tAnim<Text>* testAnim = new tAnim<Text>(testText, &Text::setBlending);
+	    
+	    testAnim->addKeyFrame(0.0, 1.0, ANIM_LINEAR);
+	    testAnim->addKeyFrame(0.0, 1.0, ANIM_LINEAR);
+	    testAnim->addKeyFrame(1.0, 1.0, ANIM_LINEAR);
+	    
+	    testAnim->addKeyFrame(0.0, 1.0, ANIM_COSINE);
+	    testAnim->addKeyFrame(1.0, 1.0, ANIM_COSINE);	  
+	    
 	    testAnim->addKeyFrame(0.0, 1.0, ANIM_SINE);
-	    testAnim->addKeyFrame(3.5, 1.0, ANIM_SINE);
-	    //testAnim->addKeyFrame(0.0, 1.0, ANIM_LINEAR);
-	    //testAnim->addKeyFrame(1.0, 1.0, ANIM_LINEAR);
+	    testAnim->addKeyFrame(1.0, 1.0, ANIM_SINE);
+	    	    testAnim->addKeyFrame(0.0, 1.0, ANIM_NEG_EXP);
+	    testAnim->addKeyFrame(1.0, 1.0, ANIM_NEG_EXP);
+	    
 	    testAnim->setInfinity(ANIM_INF_REWIND);
 	    break;
Index: /orxonox/trunk/src/track_manager.cc
===================================================================
--- /orxonox/trunk/src/track_manager.cc	(revision 3831)
+++ /orxonox/trunk/src/track_manager.cc	(revision 3832)
@@ -149,7 +149,10 @@
     childCount = this->childCount;
   
-  TrackElement* enumElem = this->children->enumerate();
+  //  TrackElement* enumElem = this->children->enumerate();
+  tIterator<TrackElement>* iterator = this->children->getIterator();
+  TrackElement* enumElem = iterator->nextElement();
   for (int i = 0; i < childCount; i++)
-    enumElem = this->children->nextElement();
+    enumElem = iterator->nextElement();
+  delete iterator;
   return enumElem;
 }
@@ -200,10 +203,13 @@
     {
       PRINT(0)("   has %d children: ", this->childCount);
-      TrackElement* enumElem = this->children->enumerate();
+      //TrackElement* enumElem = this->children->enumerate();
+      tIterator<TrackElement>* iterator = this->children->getIterator();
+      TrackElement* enumElem = iterator->nextElement();
       while (enumElem)
 	{
 	  PRINT(0)("=%d= ", enumElem->ID);
-	  enumElem = this->children->nextElement();
+	  enumElem = iterator->nextElement();
 	}
+      delete iterator;
       PRINT(0)("\n");
     }
@@ -294,5 +300,7 @@
   int i = 0;
 
-  TrackElement* enumElem = this->children->enumerate();
+  //TrackElement* enumElem = this->children->enumerate();
+  tIterator<TrackElement>* iterator = this->children->getIterator();
+  TrackElement* enumElem = iterator->nextElement();
   while (enumElem)
     {
@@ -304,6 +312,7 @@
 	}
       i++;
-      enumElem = this->children->nextElement();
-    }
+      enumElem = iterator->nextElement();
+    }
+  delete iterator;
 
   PRINTF(4)("PathDecision with nearest algorithm: %d\n", childNumber);
@@ -692,5 +701,7 @@
   if(firstJoint->childCount > 0)
     {
-      TrackElement* enumElem = firstJoint->children->enumerate();
+      //TrackElement* enumElem = firstJoint->children->enumerate();
+      tIterator<TrackElement>* iterator = firstJoint->children->getIterator();
+      TrackElement* enumElem = iterator->nextElement();
       while (enumElem)
 	{
@@ -699,6 +710,7 @@
 	  enumElem->endTime = tmpLatestTime + enumElem->duration;
 	  
-	  enumElem = firstJoint->children->nextElement();
+	  enumElem = iterator->nextElement();
 	}
+      delete iterator;
     }
   // returning to the TrackElement we were working on.
@@ -716,8 +728,9 @@
     {
       TrackElement* tmpElem = findTrackElementByID(i);
-      if (tmpElem->childCount > 0 && tmpElem->mainJoin)
+      if( tmpElem->childCount > 0 && tmpElem->mainJoin)
 	{
-
-	  TrackElement* enumElem = tmpElem->children->enumerate();
+	  tIterator<TrackElement>* iterator = tmpElem->children->getIterator();
+	  TrackElement* enumElem = iterator->nextElement();
+	  //TrackElement* enumElem = tmpElem->children->enumerate();
 	  while (enumElem)
 	    {
@@ -740,6 +753,7 @@
 		     enumElem->curve->calcAcc(0).x, enumElem->curve->calcAcc(0).y, enumElem->curve->calcAcc(0).z);
 	      
-	      enumElem = tmpElem->children->nextElement();
+	      enumElem = iterator->nextElement();
 	    }
+	  delete iterator;
 	}
     }
Index: /orxonox/trunk/src/world_entities/world_entity.cc
===================================================================
--- /orxonox/trunk/src/world_entities/world_entity.cc	(revision 3831)
+++ /orxonox/trunk/src/world_entities/world_entity.cc	(revision 3832)
@@ -104,11 +104,5 @@
 void WorldEntity::processDraw ()
 {
-  this->draw ();
-  PNode* pn = this->children->enumerate ();
-  while( pn != NULL) 
-    { 
-      ((WorldEntity*)pn)->processDraw ();
-      pn = this->children->nextElement();
-    } 
+
 }
 
