Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4485 in orxonox.OLD for orxonox/trunk/src/util/animation/animation.h


Ignore:
Timestamp:
Jun 3, 2005, 12:19:43 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: more documentation in util

File:
1 edited

Legend:

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

    r4381 r4485  
    8080  //! A virtual function that should change to the first keyframe.
    8181  virtual void rewind() = 0;
     82
    8283  /** \brief A virtual function that ticks the animation \param dt the time passed */
    8384  virtual void tick(float dt) = 0;
    8485
    85   /**
    86      \returns the BaseObject, this animation operates on
    87   */
    88   BaseObject* getBaseObject(void) const {return baseObject;}
     86  /** \returns the BaseObject, this animation operates on */
     87  BaseObject* getBaseObject(void) const { return this->baseObject; };
    8988
    9089  /** \returns if the Animation should be deleted */
    91   inline bool ifDelete(void) {return bDelete;}
     90  inline bool ifDelete(void) { return bDelete; };
    9291
    9392 protected:
     
    9594
    9695  void handleInfinity(void);
     96
     97 protected:
    9798  // variables
    98   float localTime;                //!< The Time passed since the beginning of the currentKeyFrame.
    99   ANIM_INFINITY postInfinity;     //!< describing what the animation should do after the last keyframe.
     99  float                 localTime;              //!< The Time passed since the beginning of the currentKeyFrame.
     100  ANIM_INFINITY         postInfinity;           //!< describing what the animation should do after the last keyframe.
    100101
    101   BaseObject* baseObject;         //!< The same as object in the derived classes, but with reference to BaseObject
    102   unsigned int keyFrameCount;     //!< The Count of KeyFrames.
    103   int keyFramesToPlay;            //!< How many more Keyframes to play. if negative it will be ignored if 0 stop.
    104   bool bHandled;                  //!< If this Animation is handled by the AnimationPlayer.
    105   bool bRunning;                  //!< If the animation is running
    106   bool bDelete;                   //!< If true, the animation will be deleted through the AnimationPlayer.
     102  BaseObject*           baseObject;             //!< The same as object in the derived classes, but with reference to BaseObject
     103  unsigned int          keyFrameCount;          //!< The Count of KeyFrames.
     104  int                   keyFramesToPlay;        //!< How many more Keyframes to play. if negative it will be ignored if 0 stop.
     105  bool                  bHandled;               //!< If this Animation is handled by the AnimationPlayer.
     106  bool                  bRunning;               //!< If the animation is running
     107  bool                  bDelete;                //!< If true, the animation will be deleted through the AnimationPlayer.
    107108};
    108109
    109110
     111
     112
    110113/**********************TEST*******************************/
     114//! a simple testClass for the animation
    111115class aTest
    112116{
    113117 public:
    114   aTest() { last = 0.0;}
    115   ~aTest() {}
    116   void littleDebug(float f) {  diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;}
     118  inline aTest() { last = 0.0;}
     119  /** \brief a little debug information to show the results of this class \param f new value */
     120  inline void littleDebug(float f) {  diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;}
    117121 private:
    118   float diff;
    119   float last;
     122  float     diff;           //!< difference from the last value
     123  float     last;           //!< the last calculated value
    120124};
    121125
Note: See TracChangeset for help on using the changeset viewer.