Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3797 in orxonox.OLD


Ignore:
Timestamp:
Apr 13, 2005, 5:11:01 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: added the time-functions to the amimation

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

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

    r3796 r3797  
    3838  this->postInfinity = postInfinity;
    3939}
     40
     41
     42void Anim::play()
     43{
     44  this->bRunning = true;
     45}
     46void Anim::stop()
     47{
     48  this->rewind();
     49  this->bRunning = false;
     50}
     51void Anim::pause()
     52{
     53  this->bRunning = false;
     54}
     55void Anim::replay()
     56{
     57  this->rewind();
     58  this->bRunning = true;
     59}
  • orxonox/trunk/src/animation.h

    r3795 r3797  
    5858  void pause();
    5959  void replay();
    60   //  virtual void rewind();
     60  virtual void rewind() = 0;
    6161
    6262  virtual void tick(float time) = 0;
     
    9191  virtual ~tAnim();
    9292
     93  virtual void rewind();
     94
    9395  void setFuncToAnim(T* object, void (T::*funcToAnim)(float));
    9496  void addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc = ANIM_LINEAR);
    9597
     98  virtual void tick(float time);
    9699
    97100  // animation functions
     
    111114
    112115
    113   virtual void tick(float time);
    114116
    115117 private:
     
    163165}
    164166
     167template<class T>
     168void tAnim<T>::rewind(void)
     169{
     170  this->currentKeyFrame = keyFrameList->firstElement();
     171  this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement());
     172}
    165173
    166174template<class T>
Note: See TracChangeset for help on using the changeset viewer.