Changeset 4485 in orxonox.OLD for orxonox/trunk/src/util/animation/animation.h
- Timestamp:
- Jun 3, 2005, 12:19:43 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation.h
r4381 r4485 80 80 //! A virtual function that should change to the first keyframe. 81 81 virtual void rewind() = 0; 82 82 83 /** \brief A virtual function that ticks the animation \param dt the time passed */ 83 84 virtual void tick(float dt) = 0; 84 85 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; }; 89 88 90 89 /** \returns if the Animation should be deleted */ 91 inline bool ifDelete(void) { return bDelete;}90 inline bool ifDelete(void) { return bDelete; }; 92 91 93 92 protected: … … 95 94 96 95 void handleInfinity(void); 96 97 protected: 97 98 // 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. 100 101 101 BaseObject* baseObject;//!< The same as object in the derived classes, but with reference to BaseObject102 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 running106 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. 107 108 }; 108 109 109 110 111 112 110 113 /**********************TEST*******************************/ 114 //! a simple testClass for the animation 111 115 class aTest 112 116 { 113 117 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;} 117 121 private: 118 float diff;119 float last;122 float diff; //!< difference from the last value 123 float last; //!< the last calculated value 120 124 }; 121 125
Note: See TracChangeset
for help on using the changeset viewer.