Changeset 3858 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Apr 17, 2005, 3:27:54 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation.cc
r3853 r3858 70 70 71 71 /** 72 \brief handles the Animation if it gets out of boundraries eg. if animation is finished. 73 */ 74 void Animation::handleInfinity(void) 75 { 76 switch (this->postInfinity) 77 { 78 case ANIM_INF_CONSTANT: 79 this->localTime = 0.0; 80 this->bRunning = false; 81 break; 82 case ANIM_INF_REPLAY: 83 this->replay(); 84 break; 85 case ANIM_INF_DELETE: // this will possibly never be made 86 //this->bDelete; 87 break; 88 } 89 } 90 91 /** 72 92 \brief plays the animation back from the current Time forward 73 93 */ -
orxonox/trunk/src/animation.h
r3853 r3858 25 25 26 26 //! An enumerator describing what the animation should do after the last keyframe. 27 /** 28 ANIM_INF_CONSTANT stays at the end of the animation 29 ANIM_INF_REWIND loops back to the beginning and replays the animation 30 */ 27 31 typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT, 28 ANIM_INF_LINEAR, 29 ANIM_INF_PINGPONG, 30 ANIM_INF_REWIND};//, ANIM_DELETE} 32 ANIM_INF_REPLAY, 33 ANIM_INF_DELETE};//, ANIM_INF_LINEAR, ANIM_INF_PINGPONG; 31 34 32 35 //! A Struct for Keyframes that simply hold a float … … 73 76 Animation(void); 74 77 78 void handleInfinity(void); 75 79 // variables 76 80 float localTime; //!< The Time passed since the beginning of the currentKeyFrame. … … 81 85 bool bHandled; //!< If this Animation is handled by the AnimationPlayer. 82 86 bool bRunning; //!< If the animation is running 87 // bool bDelete; //!< If true, the animation will be deleted through the AnimationPlayer. 83 88 }; 84 89 -
orxonox/trunk/src/animation3d.cc
r3857 r3858 126 126 // checking, if we should still Play the animation 127 127 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 128 { 129 switch (this->postInfinity) 130 { 131 case ANIM_INF_CONSTANT: 132 this->localTime = 0.0; 133 this->bRunning = false; 134 break; 135 case ANIM_INF_REWIND: 136 this->replay(); 137 break; 138 } 139 } 128 this->handleInfinity(); 140 129 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 141 130 this->setAnimFunc(this->currentKeyFrame->animFunc); -
orxonox/trunk/src/t_animation.h
r3857 r3858 185 185 // checking, if we should still Play the animation 186 186 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 187 { 188 switch (this->postInfinity) 189 { 190 case ANIM_INF_CONSTANT: 191 this->localTime = 0.0; 192 this->bRunning = false; 193 break; 194 case ANIM_INF_REWIND: 195 this->replay(); 196 break; 197 } 198 } 187 this->handleInfinity(); 199 188 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 200 189 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
Note: See TracChangeset
for help on using the changeset viewer.