Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3717 in orxonox.OLD


Ignore:
Timestamp:
Apr 4, 2005, 9:59:00 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: simple change in animation player

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

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

    r3661 r3717  
    156156void SimpleAnimation::addKeyFrame(KeyFrame* frame)
    157157{
    158   this->frames->add(frame);
     158  if( frame != NULL)
     159    this->frames->add(frame);
    159160}
    160161
     
    227228  if(!this->bPause)
    228229    {
    229 
    230 
    231 
     230      switch( this->mode)
     231        {
     232        case LINEAR:
     233         
     234          break;
     235        case EXP:
     236
     237          break;
     238        case NEG_EXP:
     239
     240          break;
     241        case SIN:
     242
     243          break;
     244        case COS:
     245
     246          break;
     247        case QUADRATIC:
     248
     249          break;
     250        default:
     251          break;
     252        }
    232253    }
    233254}
  • orxonox/trunk/src/simple_animation.h

    r3573 r3717  
    1616
    1717
    18 typedef enum movementMode{LINEAR=0, EXP, NEG_EXP, SIN, COS};
     18typedef enum movementMode{LINEAR=0, EXP, NEG_EXP, SIN, COS, QUADRATIC};
    1919
    2020
     
    6363 private:
    6464  bool bPause;                     //<! is set, when there is a pause
    65   tList<KeyFrame>* frames;        //<! where keyframes are stored in
     65  tList<KeyFrame>* frames;         //<! where keyframes are stored in
     66  KeyFrame* currentFrame;          //<! the frame that is been played now
     67  movementMode mode;               //<! this is an enum of the mode, how the speed is distributed
    6668  float localTime;
    6769  PNode* parent;
Note: See TracChangeset for help on using the changeset viewer.