Index: orxonox/trunk/src/t_animation.h
===================================================================
--- orxonox/trunk/src/t_animation.h	(revision 3853)
+++ orxonox/trunk/src/t_animation.h	(revision 3854)
@@ -13,5 +13,4 @@
    co-programmer: ...
 */
-
 
 /*! 
@@ -54,12 +53,14 @@
 
   //  ANIM_FUNCTION animFunc;
-  float (tAnimation<T>::*animFunc)(float) const;
-  KeyFrameF* currentKeyFrame;
-  KeyFrameF* nextKeyFrame;
-  tList<KeyFrameF>* keyFrameList;
-
-  float expFactor;
-  T* object;
-  void (T::*funcToAnim)(float);
+  float (tAnimation<T>::*animFunc)(float) const;  //!< A Function for the AnimationType
+  KeyFrameF* currentKeyFrame;                     //!< The current KeyFrame
+  KeyFrameF* nextKeyFrame;                        //!< The KeyFrame we iterate to
+  tList<KeyFrameF>* keyFrameList;                 //!< The KeyFrameList
+
+  T* object;                                      //!< The Object from which to Animate something
+  void (T::*funcToAnim)(float);                   //!< The function to Animate
+
+  float expFactor;                                //!< some factors
+
 };
 
@@ -68,5 +69,4 @@
 /**
    \brief standard constructor
-
 */
 template<class T>
@@ -91,5 +91,6 @@
 /**
    \brief standard deconstructor
-
+   
+   deletes all the Keyframes
 */
 template<class T>
@@ -106,7 +107,9 @@
   delete itKF;
   delete this->keyFrameList;
-
-}
-
+}
+
+/**
+   \brief rewinds the Animation to the beginning (first KeyFrame and time == 0)
+*/
 template<class T>
 void tAnimation<T>::rewind(void)
@@ -117,4 +120,9 @@
 }
 
+/**
+   \brief sets the Function we want to animate
+   \param object from what object do we want to animate
+   \param funcToAnim which function
+*/
 template<class T>
 void tAnimation<T>::setFuncToAnim(T* object, void (T::*funcToAnim)(float))
@@ -124,4 +132,10 @@
 }
 
+/**
+   \brief Appends a new Keyframe
+   \param value the value of the new KeyFrame
+   \param duration The duration from the new KeyFrame to the next one
+   \param animFunc The function to animate between this keyFrame and the next one
+*/
 template<class T>
 void tAnimation<T>::addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc)
@@ -152,5 +166,8 @@
 }
 
-
+/**
+   \brief ticks the Animation
+   \param dt how much time to tick
+*/
 template<class T>
 void tAnimation<T>::tick(float dt)
@@ -187,5 +204,8 @@
 }
 
-
+/**
+   \brief Sets The kind of Animation between this keyframe and the next one
+   \param animFunc The Type of Animation to set
+*/
 template<class T>
 void tAnimation<T>::setAnimFunc(ANIM_FUNCTION animFunc)
@@ -227,10 +247,19 @@
 
 // animation functions
+
+/**
+   \brief some random animation (fluctuating)
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::random(float timePassed) const
 {
-  return (float)rand()/(float)RAND_MAX;
-}
-
+  return this->currentKeyFrame->value * (float)rand()/(float)RAND_MAX;
+}
+
+/**
+   \brief stays at the value of the currentKeyFrame
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::constant(float timePassed) const
@@ -239,4 +268,8 @@
 }
 
+/**
+   \brief linear interpolation between this keyframe and the next one
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::linear(float timePassed) const 
@@ -248,4 +281,8 @@
 }
 
+/**
+   \brief a Sinusodial Interpolation between this keyframe and the next one
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::sine(float timePassed) const
@@ -260,4 +297,8 @@
 }
 
+/**
+   \brief a cosine interpolation between this keyframe and the next one
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::cosine(float timePassed) const
@@ -273,4 +314,8 @@
 }
 
+/**
+   \brief an exponential interpolation between this keyframe and the next one
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::exp(float timePassed) const
@@ -278,4 +323,8 @@
 }
 
+/**
+   \brief a negative exponential interpolation between this keyframe and the next one
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::negExp(float timePassed) const
@@ -286,4 +335,8 @@
 }
 
+/**
+   \brief a quadratic interpolation between this keyframe and the next one
+   \param timePassed The time passed since this Keyframe began
+*/
 template<class T>
 float tAnimation<T>::quadratic(float timePassed) const
