Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2005, 3:17:43 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now there is a posibility to play only parts of the animation:
use anim→playNextKeyframes(count_of_keyframes_to_play); to make it work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/animation/animation.cc

    r3876 r3982  
    3434
    3535  // setting default values
     36  this->keyFramesToPlay = -1;
    3637  this->localTime = 0.0;
    3738  this->bRunning = true;
     
    8384      break;
    8485    case ANIM_INF_REPLAY:
    85       this->replay();
     86      this->rewind();
     87      this->bRunning = true;
    8688      break;
    8789    case ANIM_INF_REWIND:
     
    99101void Animation::play()
    100102{
     103  this->keyFramesToPlay = -1;
     104  this->bRunning = true;
     105}
     106
     107/**
     108   \brief plays the Next n keyframes
     109   \param n the Count of keyFrames to play.
     110*/
     111void Animation::playNextKeyframes(int n)
     112{
     113  this->keyFramesToPlay = n-1;
    101114  this->bRunning = true;
    102115}
     
    107120void Animation::stop()
    108121{
     122  this->keyFramesToPlay = -1;
    109123  this->rewind();
    110124  this->bRunning = true;
     
    127141{
    128142  this->rewind();
    129   this->bRunning = true;
     143  this->play();
    130144}
Note: See TracChangeset for help on using the changeset viewer.