Changeset 3853 in orxonox.OLD for orxonox/trunk/src/animation.h
- Timestamp:
- Apr 17, 2005, 1:56:03 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation.h
r3852 r3853 14 14 #define DELTA_X 0.05 //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta 15 15 16 //! An enumerator of Functions to describe the flow of the Animation 16 17 typedef enum ANIM_FUNCTION {ANIM_CONSTANT, 17 18 ANIM_LINEAR, … … 23 24 ANIM_RANDOM}; 24 25 26 //! An enumerator describing what the animation should do after the last keyframe. 25 27 typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT, 26 28 ANIM_INF_LINEAR, … … 28 30 ANIM_INF_REWIND};//, ANIM_DELETE} 29 31 32 //! A Struct for Keyframes that simply hold a float 30 33 typedef struct KeyFrameF 31 34 { 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 35 38 }; 36 39 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 */ 37 50 class Animation 38 51 { … … 47 60 void pause(); 48 61 void replay(); 62 //! A virtual function that should change to the first keyframe. 49 63 virtual void rewind() = 0; 50 64 /** \brief A virtual function that ticks the animation \param dt the time passed */ 51 65 virtual void tick(float dt) = 0; 52 53 /* implement in subclasses:54 *55 * De-/Constructor56 * Animation Functions57 * virtual tick58 * List of keyFrames59 * currentKeyFrame/nextKeyFrame60 * virtual rewind, to go to the first Keyframe. (other functions will call this one)61 */62 66 63 67 /** … … 70 74 71 75 // 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. 75 78 76 79 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). 78 81 bool bHandled; //!< If this Animation is handled by the AnimationPlayer. 79 bool bRunning; 82 bool bRunning; //!< If the animation is running 80 83 }; 81 84
Note: See TracChangeset
for help on using the changeset viewer.