Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3850 in orxonox.OLD


Ignore:
Timestamp:
Apr 17, 2005, 11:51:06 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: added some functions (for function pointers) to the Animation3D class

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

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

    r3848 r3850  
    4242}
    4343
     44void Animation3D::setAnimFunc(ANIM_FUNCTION animFunc)
     45{
     46  switch (animFunc)
     47    {
     48    default:
     49    case ANIM_CONSTANT:
     50      this->animFunc = &Animation3D::constant;
     51      break;
     52    case ANIM_LINEAR:
     53      this->animFunc = &Animation3D::linear;
     54      break;
     55    case ANIM_SINE:
     56      this->animFunc = &Animation3D::sine;
     57      break;
     58    case ANIM_COSINE:
     59      this->animFunc = &Animation3D::cosine;
     60      break;
     61    case ANIM_EXP:
     62      this->animFunc = &Animation3D::exp;
     63      break;
     64    case ANIM_NEG_EXP:
     65      this->animFunc = &Animation3D::negExp;
     66      break;
     67    case ANIM_QUADRATIC:
     68      this->animFunc = &Animation3D::quadratic;
     69      break;
     70    case ANIM_RANDOM:
     71      this->animFunc = &Animation3D::random;
     72      break;
     73    }
     74}
     75
    4476
    4577void Animation3D::tick(float timePassed)
     
    4880}
    4981
     82
     83float Animation3D::constant(float timePassed) const
     84{
     85
     86}
     87
     88float Animation3D::linear(float timePassed) const
     89{
     90
     91}
     92
     93float Animation3D::sine(float timePassed) const
     94{
     95
     96}
     97
     98float Animation3D::cosine(float timePassed) const
     99{
     100
     101}
     102
     103float Animation3D::exp(float timePassed) const
     104{
     105
     106}
     107
     108float Animation3D::negExp(float timePassed) const
     109{
     110
     111}
     112
     113float Animation3D::quadratic(float timePassed) const
     114{
     115
     116}
     117
     118float Animation3D::random(float timePassed) const
     119{
     120
     121}
    50122
    51123
  • orxonox/trunk/src/simple_animation.h

    r3848 r3850  
    7070  KeyFrame3D* nextKeyFrame;
    7171  tList<KeyFrame3D>* keyFrameList;
     72  float (Animation3D::*animFunc)(float) const;
    7273
    7374  // private
Note: See TracChangeset for help on using the changeset viewer.