Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3820 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Apr 14, 2005, 12:31:09 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: more descriptive comments

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

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

    r3816 r3820  
    2424  // initialize a beginning KeyFrame, that will be deleted afterwards
    2525  this->bHasKeys = false;
     26  this->bHandled = true;
    2627
    2728  // setting default values
     
    3233}
    3334
    34 
    3535Anim::~Anim(void)
    3636{
    37   AnimationPlayer::getInstance()->removeAnimation(this);
     37  this->doNotHandle();
    3838}
     39
     40void Anim::doNotHandle(void)
     41{
     42  if (this->bHandled)
     43    AnimationPlayer::getInstance()->removeAnimation(this);
     44}
     45
    3946
    4047void Anim::setInfinity(ANIM_INFINITY postInfinity)
  • orxonox/trunk/src/animation.h

    r3798 r3820  
    5151 public:
    5252  virtual ~Anim(void);
     53  void doNotHandle(void);
    5354
    5455  void setInfinity(ANIM_INFINITY postInfinity = ANIM_INF_CONSTANT);
     
    8081
    8182  bool bHasKeys;
     83  bool bHandled;                  //!< If this Animation is handled by the AnimationPlayer.
    8284  bool bRunning;
    8385};
  • orxonox/trunk/src/animation_player.h

    r3816 r3820  
    1212
    1313//! A AnimationPlayer, that handles the animation of all the Animations in the scene.
     14/**
     15   <b>AnimationPlayer usage:</b> \n
     16
     17   <b>Initialisation</b>: AnimationPlayer::getInstance() does the trick this is
     18   usually done when initializing a world \n
     19   <b>Adding Animations</b>: create an Animation the following Way:
     20   \li Anim* animation = new Anim(); // also use any other Subclass of Animation to initialize this
     21   \li set some parameters: also see the specific classes for more info
     22   \n
     23   if you do not want a specific Animation to be handled by the AnimationPlayer, you have to
     24   unload it explicitely with animation->doNotHandle();
     25   \n
     26   eveything else will be done by the AnimationPlayer itself.\n
     27*/
    1428class AnimationPlayer : public BaseObject {
    1529
Note: See TracChangeset for help on using the changeset viewer.