Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5062 in orxonox.OLD for orxonox/trunk/src/util/animation


Ignore:
Timestamp:
Aug 17, 2005, 1:02:01 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: animation3D-update, so now one should be able to let the setPos/setDir away, but it does not really work

Location:
orxonox/trunk/src/util/animation
Files:
2 edited

Legend:

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

    r5039 r5062  
    3333typedef enum ANIM_FUNCTION
    3434{
    35   ANIM_CONSTANT,
    36   ANIM_LINEAR,
    37   ANIM_SINE,
    38   ANIM_COSINE,
    39   ANIM_EXP,
    40   ANIM_NEG_EXP,
    41   ANIM_QUADRATIC,
    42   ANIM_RANDOM,
    43   ANIM_NULL
     35  ANIM_NULL         = 0,
     36  ANIM_CONSTANT     = 1,
     37  ANIM_LINEAR       = 2,
     38  ANIM_SINE         = 3,
     39  ANIM_COSINE       = 4,
     40  ANIM_EXP          = 5,
     41  ANIM_NEG_EXP      = 6,
     42  ANIM_QUADRATIC    = 7,
     43  ANIM_RANDOM       = 8,
    4444};
    4545
  • orxonox/trunk/src/util/animation/animation3d.cc

    r4998 r5062  
    4444  this->nextKeyFrame = tmpKeyFrame;
    4545
    46   this->animFuncMov = &Animation3D::mLinear;
    47   this->animFuncRot = &Animation3D::rLinear;
     46  this->animFuncMov = NULL;//&Animation3D::mLinear;
     47  this->animFuncRot = NULL;//&Animation3D::rLinear;
    4848
    4949}
     
    9595    duration = 1.0;
    9696  // if the Rotation-Animation-function is set ANIM_NULL, animFuncRot will match animFuncRot
    97   if (animFuncMov == ANIM_NULL)
    98     animFuncMov = ANIM_DEFAULT_FUNCTION;
    99   if (animFuncRot == ANIM_NULL)
    100     animFuncRot = animFuncMov;
     97//  if (animFuncMov == ANIM_NULL)
     98//    animFuncMov = ANIM_DEFAULT_FUNCTION;
     99//  if (animFuncRot == ANIM_NULL)
     100//    animFuncRot = animFuncMov;
    101101
    102102  KeyFrame3D* tmpKeyFrame;
     
    126126  this->keyFrameCount++;
    127127}
    128 
    129 
    130128
    131129/**
     
    158156        }
    159157      /* now animate it */
    160       (this->*animFuncMov)(this->localTime);
    161       (this->*animFuncRot)(this->localTime);
     158      if (likely(this->animFuncMov != NULL))
     159        (this->*animFuncMov)(this->localTime);
     160      if (likely(this->animFuncRot != NULL))
     161        (this->*animFuncRot)(this->localTime);
    162162    }
    163163}
     
    211211      break;
    212212    default:
     213      this->animFuncMov = NULL;
    213214      break;
    214215    }
     
    353354  switch (animFuncRot)
    354355    {
    355     default:
    356356    case ANIM_CONSTANT:
    357357      this->animFuncRot = &Animation3D::rConstant;
     
    380380      break;
    381381
     382    default:
     383      this->animFuncRot = NULL;
    382384    }
    383385}
     
    448450void Animation3D::rExp(float timePassed) const
    449451{
    450   PRINTF(0)("exp rotation function not implemented\n");
     452  PRINTF(2)("exp rotation function not implemented\n");
    451453}
    452454
Note: See TracChangeset for help on using the changeset viewer.