Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3853 in orxonox.OLD for orxonox


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

orxonox/trunk: doxygen-comments

Location:
orxonox/trunk/src
Files:
4 edited

Legend:

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

    r3847 r3853  
    1919#include "animation_player.h"
    2020
    21 
     21/**
     22   \brief creates a new Animation
     23   
     24   This also adds the Animation automatically to the AnimationPlayer's list
     25*/
    2226Animation::Animation(void)
    2327
     
    3438}
    3539
     40/**
     41   \brief destructs the Animation
     42   
     43   this also takes the animation out of the AnimationPlayer's list (if it is there)
     44*/
    3645Animation::~Animation(void)
    3746{
     
    3948}
    4049
     50/**
     51   \brief tells the AnimationPlayer, that we do not wish to  handle this animation
     52   automatically.
     53   
     54   This means that it will not be ticked, and not be deleted with the AnimationPlayer
     55*/
    4156void Animation::doNotHandle(void)
    4257{
     
    4560}
    4661
    47 
     62/**
     63   \brief Sets the infinitymode
     64   \param postInfinity How the Animation should advance after the last Keyframe
     65*/
    4866void Animation::setInfinity(ANIM_INFINITY postInfinity)
    4967{
     
    5169}
    5270
    53 
     71/**
     72   \brief plays the animation back from the current Time forward
     73*/
    5474void Animation::play()
    5575{
     
    5777}
    5878
    59 
     79/**
     80   \brief Stops the animation. eg. pause(); rewind();
     81*/
    6082void Animation::stop()
    6183{
     
    6587  this->bRunning = false;
    6688}
     89
     90/**
     91   \brief Pauses the animation. Stays at the current Time
     92*/
    6793void Animation::pause()
    6894{
    6995  this->bRunning = false;
    7096}
     97
     98/**
     99   \brief replays the animation, eg. rewind();play();
     100*/
    71101void Animation::replay()
    72102{
  • 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
  • orxonox/trunk/src/animation3d.cc

    r3852 r3853  
    113113                {
    114114                case ANIM_INF_CONSTANT:
     115                  this->localTime = 0.0;
    115116                  this->bRunning = false;
    116117                  break;
  • orxonox/trunk/src/t_animation.h

    r3852 r3853  
    171171                {
    172172                case ANIM_INF_CONSTANT:
     173                  this->localTime = 0.0;
    173174                  this->bRunning = false;
    174175                  break;
Note: See TracChangeset for help on using the changeset viewer.