Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3979 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Apr 26, 2005, 2:24:50 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: nicer implementation, also fool-proof now

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

Legend:

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

    r3978 r3979  
    3939                            ANIM_RANDOM,
    4040                            ANIM_NULL};
     41#define ANIM_DEFAULT_FUNCTION ANIM_LINEAR      //!< A default function to choose from the above set
    4142
    4243//! An enumerator describing what the animation should do after the last keyframe.
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3978 r3979  
    9191    duration = 1.0;
    9292  // if the Rotation-Animation-function is set ANIM_NULL, animFuncRot will match animFuncRot
     93  if (animFuncMov == ANIM_NULL)
     94    animFuncMov = ANIM_DEFAULT_FUNCTION;
    9395  if (animFuncRot == ANIM_NULL)
    9496    animFuncRot = animFuncMov;
  • orxonox/trunk/src/util/animation/animation3d.h

    r3978 r3979  
    3535  virtual void rewind(void);
    3636
    37   void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFuncMov = ANIM_LINEAR, ANIM_FUNCTION animFuncRot = ANIM_NULL);
     37  void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFuncMov = ANIM_DEFAULT_FUNCTION, ANIM_FUNCTION animFuncRot = ANIM_NULL);
    3838  //  void addKeyFrame(KeyFrame3D* frame);
    3939
  • orxonox/trunk/src/util/animation/t_animation.h

    r3968 r3979  
    4343  void setFuncToAnim(T* object, void (T::*funcToAnim)(float));
    4444
    45   void addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc = ANIM_LINEAR);
     45  void addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc = ANIM_DEFAULT_FUNCTION);
    4646
    4747  virtual void rewind();
     
    154154  if (duration <= 0.0)
    155155    duration = 1.0;
     156  if (animFunc == ANIM_NULL)
     157    animFunc = ANIM_DEFAULT_FUNCTION;
    156158
    157159  KeyFrameF* tmpKeyFrame;
Note: See TracChangeset for help on using the changeset viewer.