Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3829 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Apr 14, 2005, 2:33:47 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now the keyframe should also change the animation-function

File:
1 edited

Legend:

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

    r3828 r3829  
    236236  tmpKeyFrame->duration = duration;
    237237  tmpKeyFrame->animFunc = animFunc;
    238  
    239238}
    240239
     
    261260          this->nextKeyFrame = this->keyFrameList->nextElement(this->nextKeyFrame);
    262261          printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
    263          
    264          
     262          this->setAnimFunc(this->currentKeyFrame->animFunc);     
    265263        }
    266264     
     
    294292      this->animFunc = &tAnim<T>::negExp;
    295293      break;
    296     case ANIM_SINE:
     294    case ANIM_QUADRATIC:
    297295      this->animFunc = &tAnim<T>::quadratic;
    298296      break;
     
    329327float tAnim<T>::sine(float timePassed) const
    330328{
    331   return this->currentkeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
     329  return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
    332330    * sin(timePassed / this->currentKeyFrame->duration * M_PI);
    333331}
     
    336334float tAnim<T>::cosine(float timePassed) const
    337335{
    338   return this->currentkeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
     336  return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
    339337    * cos(timePassed / this->currentKeyFrame->duration * M_PI);
    340338}
Note: See TracChangeset for help on using the changeset viewer.