Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2005, 1:55:47 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: animation3d extended for definition of individual rotation function per keyFrame

File:
1 edited

Legend:

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

    r3964 r3973  
    1919  Vector position;                  //!< The position of this KeyFrame
    2020  Quaternion direction;             //!< The direction of this KeyFrame
    21   ANIM_FUNCTION animFunc;           //!< with whitch function to iterate to the next KeyFrame3D
     21  ANIM_FUNCTION animFuncMov;        //!< with whitch function to iterate movement to the next KeyFrame3D
     22  ANIM_FUNCTION animFuncRot;        //!< with whitch function to iterate rotation to the next KeyFrame3D
    2223};
    2324
     
    3435  virtual void rewind(void);
    3536
    36   void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFunc = ANIM_LINEAR);
     37  void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFuncMov = ANIM_LINEAR, ANIM_FUNCTION animFuncRot = ANIM_LINEAR);
    3738  //  void addKeyFrame(KeyFrame3D* frame);
    3839
    3940  virtual void tick(float dt);
    40 
     41 
    4142 private:
    4243  // animation functions
    43   void setAnimFunc(ANIM_FUNCTION animFunc);
    44   void constant(float timePassed) const;
    45   void linear(float timePassed) const;
    46   void sine(float timePassed) const;
    47   void cosine(float timePassed) const;
    48   void exp(float timePassed) const;
    49   void negExp(float timePassed) const;
    50   void quadratic(float timePassed) const;
    51   void random(float timePassed) const;
     44  void setAnimFuncMov(ANIM_FUNCTION animFunc);
     45  void setAnimFuncRot(ANIM_FUNCTION animFunc);
     46  void mConstant(float timePassed) const;
     47  void mLinear(float timePassed) const;
     48  void mSine(float timePassed) const;
     49  void mCosine(float timePassed) const;
     50  void mExp(float timePassed) const;
     51  void mNegExp(float timePassed) const;
     52  void mQuadratic(float timePassed) const;
     53  void mRandom(float timePassed) const;
     54  void rConstant(float timePassed) const;
     55  void rLinear(float timePassed) const;
     56  void rSine(float timePassed) const;
     57  void rCosine(float timePassed) const;
     58  void rExp(float timePassed) const;
     59  void rNegExp(float timePassed) const;
     60  void rQuadratic(float timePassed) const;
     61  void rRandom(float timePassed) const;
    5262  //  ANIM_FUNCTION animFunc;
    53   void (Animation3D::*animFunc)(float) const;      //!< A Function for the AnimationType
     63  void (Animation3D::*animFuncMov)(float) const;      //!< A Function for the AnimationType
     64  void (Animation3D::*animFuncRot)(float) const;      //!< A Function for the AnimationType
    5465
    5566  KeyFrame3D* currentKeyFrame;                     //!< The current KeyFrame
Note: See TracChangeset for help on using the changeset viewer.