Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3978 in orxonox.OLD


Ignore:
Timestamp:
Apr 26, 2005, 2:13:40 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: a Hack that enables setup of animation without giving both animation3D-addkeyframe-function attributes

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

Legend:

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

    r3876 r3978  
    2525   ANIM_NEG_EXP: fast, slow
    2626   ANIM_RANDOM: eratic
    27    
     27
     28   ANIM_NULL: !!DO NOT USE THIS!! only for internal handling
     29
    2830   deprecated QUADRATIC
    2931*/
     
    3537                            ANIM_NEG_EXP,
    3638                            ANIM_QUADRATIC,
    37                             ANIM_RANDOM};
     39                            ANIM_RANDOM,
     40                            ANIM_NULL};
    3841
    3942//! An enumerator describing what the animation should do after the last keyframe.
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3977 r3978  
    8282   \param direction The direction of the new Keyframe.
    8383   \param duration The duration from the new KeyFrame to the next one
    84    \param animFunc The function to animate between this keyFrame and the next one
     84   \param animFuncMov The function to animate position between this keyFrame and the next one
     85   \param animFuncMov The function to animate rotation between this keyFrame and the next one
    8586*/
    8687void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration, ANIM_FUNCTION animFuncMov, ANIM_FUNCTION animFuncRot)
     
    8990  if (duration <= 0.0)
    9091    duration = 1.0;
     92  // if the Rotation-Animation-function is set ANIM_NULL, animFuncRot will match animFuncRot
     93  if (animFuncRot == ANIM_NULL)
     94    animFuncRot = animFuncMov;
    9195
    9296  KeyFrame3D* tmpKeyFrame;
  • orxonox/trunk/src/util/animation/animation3d.h

    r3977 r3978  
    3535  virtual void rewind(void);
    3636
    37   void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFuncMov = ANIM_LINEAR, ANIM_FUNCTION animFuncRot = ANIM_LINEAR);
     37  void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFuncMov = ANIM_LINEAR, ANIM_FUNCTION animFuncRot = ANIM_NULL);
    3838  //  void addKeyFrame(KeyFrame3D* frame);
    3939
Note: See TracChangeset for help on using the changeset viewer.