Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3853 in orxonox.OLD for orxonox/trunk/src/animation.h


Ignore:
Timestamp:
Apr 17, 2005, 1:56:03 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: doxygen-comments

File:
1 edited

Legend:

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

    r3852 r3853  
    1414#define DELTA_X 0.05  //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta
    1515
     16//! An enumerator of Functions to describe the flow of the Animation
    1617typedef enum ANIM_FUNCTION {ANIM_CONSTANT,
    1718                            ANIM_LINEAR,
     
    2324                            ANIM_RANDOM};
    2425
     26//! An enumerator describing what the animation should do after the last keyframe.
    2527typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT,
    2628                            ANIM_INF_LINEAR,
     
    2830                            ANIM_INF_REWIND};//, ANIM_DELETE}
    2931
     32//! A Struct for Keyframes that simply hold a float
    3033typedef struct KeyFrameF
    3134{
    32   float duration;
    33   float value;
    34   ANIM_FUNCTION animFunc;
     35  float duration;             //!< duration of this keyframe
     36  float value;                //!< value of this keyframe
     37  ANIM_FUNCTION animFunc;     //!< with whitch function to iterate to the next KeyFrameF
    3538};
    3639
     40//! A Superclass for describing an animation (all animations will be derived from this one)
     41/** implement in subclasses:
     42 *
     43 * De-/Constructor
     44 * Animation Functions
     45 * virtual tick
     46 * List of keyFrames
     47 * currentKeyFrame/nextKeyFrame
     48 * virtual rewind, to go to the first Keyframe. (other functions will call this one)
     49*/
    3750class Animation
    3851{
     
    4760  void pause();
    4861  void replay();
     62  //! A virtual function that should change to the first keyframe.
    4963  virtual void rewind() = 0;
    50 
     64  /** \brief A virtual function that ticks the animation \param dt the time passed */
    5165  virtual void tick(float dt) = 0;
    52 
    53   /* implement in subclasses:
    54    *
    55    * De-/Constructor
    56    * Animation Functions
    57    * virtual tick
    58    * List of keyFrames
    59    * currentKeyFrame/nextKeyFrame
    60    * virtual rewind, to go to the first Keyframe. (other functions will call this one)
    61    */
    6266
    6367  /**
     
    7074
    7175  // variables
    72 
    73   float localTime;
    74   ANIM_INFINITY postInfinity;
     76  float localTime;                //!< The Time passed since the beginning of the currentKeyFrame.
     77  ANIM_INFINITY postInfinity;     //!< describing what the animation should do after the last keyframe.
    7578
    7679  BaseObject* baseObject;         //!< The same as object in the derived classes, but with reference to BaseObject
    77   bool bHasKeys;
     80  bool bHasKeys;                  //!< If the animation has any keys at all. Needed to add the first keyframe (and delete the dummy).
    7881  bool bHandled;                  //!< If this Animation is handled by the AnimationPlayer.
    79   bool bRunning;
     82  bool bRunning;                  //!< If the animation is running
    8083};
    8184
Note: See TracChangeset for help on using the changeset viewer.