Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3831 in orxonox.OLD for orxonox/trunk/src/animation.h


Ignore:
Timestamp:
Apr 14, 2005, 2:54:02 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: implemente animation sine function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/animation.h

    r3830 r3831  
    328328float tAnim<T>::sine(float timePassed) const
    329329{
     330  float d = this->currentKeyFrame->value - this->nextKeyFrame->value;
     331  float e = 0.5 * d * (1 - cos(M_PI * timePassed / this->currentKeyFrame->duration));
     332  //printf("d=%f, t=%f, T=%f\n", d, timePassed, this->currentKeyFrame->duration);
     333  return this->currentKeyFrame->value - e;
     334  /*
    330335  return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
    331336    * sin(timePassed / this->currentKeyFrame->duration * M_PI);
     337  */
    332338}
    333339
Note: See TracChangeset for help on using the changeset viewer.