Changeset 4836 in orxonox.OLD for orxonox/trunk/src/util/animation
- Timestamp:
- Jul 12, 2005, 12:33:16 AM (20 years ago)
- Location:
- orxonox/trunk/src/util/animation
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation.cc
r4746 r4836 21 21 22 22 /** 23 \briefcreates a new Animation23 * creates a new Animation 24 24 25 25 This also adds the Animation automatically to the AnimationPlayer's list … … 44 44 45 45 /** 46 \briefdestructs the Animation46 * destructs the Animation 47 47 48 48 this also takes the animation out of the AnimationPlayer's list (if it is there) … … 54 54 55 55 /** 56 \brieftells the AnimationPlayer, that we do not wish to handle this animation56 * tells the AnimationPlayer, that we do not wish to handle this animation 57 57 automatically. 58 58 … … 66 66 67 67 /** 68 \briefSets the infinitymode69 \param postInfinity How the Animation should advance after the last Keyframe68 * Sets the infinitymode 69 * @param postInfinity How the Animation should advance after the last Keyframe 70 70 */ 71 71 void Animation::setInfinity(ANIM_INFINITY postInfinity) … … 75 75 76 76 /** 77 \briefhandles the Animation if it gets out of boundraries eg. if animation is finished.77 * handles the Animation if it gets out of boundraries eg. if animation is finished. 78 78 */ 79 79 void Animation::handleInfinity() … … 99 99 100 100 /** 101 \briefplays the animation back from the current Time forward101 * plays the animation back from the current Time forward 102 102 */ 103 103 void Animation::play() … … 108 108 109 109 /** 110 \briefplays the Next n keyframes111 \param n the Count of keyFrames to play.110 * plays the Next n keyframes 111 * @param n the Count of keyFrames to play. 112 112 */ 113 113 void Animation::playNextKeyframes(int n) … … 118 118 119 119 /** 120 \briefStops the animation. eg. pause(); rewind();120 * Stops the animation. eg. pause(); rewind(); 121 121 */ 122 122 void Animation::stop() … … 130 130 131 131 /** 132 \briefPauses the animation. Stays at the current Time132 * Pauses the animation. Stays at the current Time 133 133 */ 134 134 void Animation::pause() … … 138 138 139 139 /** 140 \briefreplays the animation, eg. rewind();play();140 * replays the animation, eg. rewind();play(); 141 141 */ 142 142 void Animation::replay() -
orxonox/trunk/src/util/animation/animation.h
r4746 r4836 16 16 //! An enumerator of Functions to describe the flow of the Animation 17 17 /** 18 \todo check with Patrick it of18 @todo check with Patrick it of 19 19 20 20 description in speed to the next keyframe: … … 88 88 virtual void rewind() = 0; 89 89 90 /** \brief A virtual function that ticks the animation \param dt the time passed */90 /** \brief A virtual function that ticks the animation @param dt the time passed */ 91 91 virtual void tick(float dt) = 0; 92 92 93 /** \returns the BaseObject, this animation operates on */93 /** @returns the BaseObject, this animation operates on */ 94 94 BaseObject* getBaseObject() const { return this->baseObject; }; 95 95 96 /** \returns if the Animation should be deleted */96 /** @returns if the Animation should be deleted */ 97 97 inline bool ifDelete() { return bDelete; }; 98 98 … … 124 124 public: 125 125 inline aTest() { last = 0.0;} 126 /** \brief a little debug information to show the results of this class \param f new value */126 /** \brief a little debug information to show the results of this class @param f new value */ 127 127 inline void littleDebug(float f) { diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;} 128 128 private: -
orxonox/trunk/src/util/animation/animation3d.cc
r4746 r4836 28 28 29 29 /** 30 \briefstandard constructor30 * standard constructor 31 31 */ 32 32 Animation3D::Animation3D(PNode* object) … … 50 50 51 51 /** 52 \briefstandard deconstructor52 * standard deconstructor 53 53 54 54 deletes all the Keyframes … … 69 69 70 70 /** 71 \briefrewinds the Animation to the beginning (first KeyFrame and time == 0)71 * rewinds the Animation to the beginning (first KeyFrame and time == 0) 72 72 */ 73 73 void Animation3D::rewind() … … 81 81 82 82 /** 83 \briefAppends a new Keyframe84 \param position The position of the new Keyframe85 \param direction The direction of the new Keyframe.86 \param duration The duration from the new KeyFrame to the next one87 \param animFuncMov The function to animate position between this keyFrame and the next one88 \param animFuncRot The function to animate rotation between this keyFrame and the next one83 * Appends a new Keyframe 84 * @param position The position of the new Keyframe 85 * @param direction The direction of the new Keyframe. 86 * @param duration The duration from the new KeyFrame to the next one 87 * @param animFuncMov The function to animate position between this keyFrame and the next one 88 * @param animFuncRot The function to animate rotation between this keyFrame and the next one 89 89 */ 90 90 void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration, … … 130 130 131 131 /** 132 \briefticks the Animation133 \param dt how much time to tick132 * ticks the Animation 133 * @param dt how much time to tick 134 134 */ 135 135 void Animation3D::tick(float dt) … … 167 167 168 168 /** 169 \briefSets The kind of movment Animation between this keyframe and the next one170 \param animFuncMov: The Type of Animation to set169 * Sets The kind of movment Animation between this keyframe and the next one 170 * @param animFuncMov: The Type of Animation to set 171 171 */ 172 172 void Animation3D::setAnimFuncMov(ANIM_FUNCTION animFuncMov) … … 216 216 217 217 /** 218 \briefstays at the value of the currentKeyFrame219 \param timePassed The time passed since this Keyframe began218 * stays at the value of the currentKeyFrame 219 * @param timePassed The time passed since this Keyframe began 220 220 */ 221 221 void Animation3D::mConstant(float timePassed) const … … 232 232 233 233 /** 234 \brieflinear interpolation between this keyframe and the next one235 \param timePassed The time passed since this Keyframe began236 237 \todo implement also do this for direction234 * linear interpolation between this keyframe and the next one 235 * @param timePassed The time passed since this Keyframe began 236 237 @todo implement also do this for direction 238 238 */ 239 239 void Animation3D::mLinear(float timePassed) const … … 245 245 246 246 /** 247 \briefa Sinusodial Interpolation between this keyframe and the next one248 \param timePassed The time passed since this Keyframe began249 250 \todo implement247 * a Sinusodial Interpolation between this keyframe and the next one 248 * @param timePassed The time passed since this Keyframe began 249 250 @todo implement 251 251 */ 252 252 void Animation3D::mSine(float timePassed) const … … 264 264 265 265 /** 266 \briefa cosine interpolation between this keyframe and the next one267 \param timePassed The time passed since this Keyframe began268 269 \todo implement266 * a cosine interpolation between this keyframe and the next one 267 * @param timePassed The time passed since this Keyframe began 268 269 @todo implement 270 270 */ 271 271 void Animation3D::mCosine(float timePassed) const … … 287 287 288 288 /** 289 \briefan exponential interpolation between this keyframe and the next one290 \param timePassed The time passed since this Keyframe began289 * an exponential interpolation between this keyframe and the next one 290 * @param timePassed The time passed since this Keyframe began 291 291 */ 292 292 void Animation3D::mExp(float timePassed) const … … 297 297 298 298 /** 299 \briefa negative exponential interpolation between this keyframe and the next one300 \param timePassed The time passed since this Keyframe began299 * a negative exponential interpolation between this keyframe and the next one 300 * @param timePassed The time passed since this Keyframe began 301 301 */ 302 302 void Animation3D::mNegExp(float timePassed) const … … 316 316 317 317 /** 318 \briefa quadratic interpolation between this keyframe and the next one319 \param timePassed The time passed since this Keyframe began320 321 \todo implement318 * a quadratic interpolation between this keyframe and the next one 319 * @param timePassed The time passed since this Keyframe began 320 321 @todo implement 322 322 */ 323 323 void Animation3D::mQuadratic(float timePassed) const … … 328 328 329 329 /** 330 \briefsome random animation (fluctuating)331 \param timePassed The time passed since this Keyframe began330 * some random animation (fluctuating) 331 * @param timePassed The time passed since this Keyframe began 332 332 */ 333 333 void Animation3D::mRandom(float timePassed) const … … 346 346 347 347 /** 348 \briefSets The kind of rotation Animation between this keyframe and the next one349 \param animFuncRot: The Type of Animation to set348 * Sets The kind of rotation Animation between this keyframe and the next one 349 * @param animFuncRot: The Type of Animation to set 350 350 */ 351 351 void Animation3D::setAnimFuncRot(ANIM_FUNCTION animFuncRot) … … 385 385 386 386 /** 387 \briefstays at the value of the currentKeyFrame388 \param timePassed The time passed since this Keyframe began387 * stays at the value of the currentKeyFrame 388 * @param timePassed The time passed since this Keyframe began 389 389 */ 390 390 void Animation3D::rConstant(float timePassed) const … … 394 394 395 395 /** 396 \brieflinear interpolation between this keyframe and the next one397 \param timePassed The time passed since this Keyframe began398 399 \todo implement also do this for direction396 * linear interpolation between this keyframe and the next one 397 * @param timePassed The time passed since this Keyframe began 398 399 @todo implement also do this for direction 400 400 */ 401 401 void Animation3D::rLinear(float timePassed) const … … 407 407 408 408 /** 409 \briefa Sinusodial Interpolation between this keyframe and the next one410 \param timePassed The time passed since this Keyframe began411 412 \todo implement409 * a Sinusodial Interpolation between this keyframe and the next one 410 * @param timePassed The time passed since this Keyframe began 411 412 @todo implement 413 413 */ 414 414 void Animation3D::rSine(float timePassed) const … … 427 427 428 428 /** 429 \briefa cosine interpolation between this keyframe and the next one430 \param timePassed The time passed since this Keyframe began431 432 \todo implement429 * a cosine interpolation between this keyframe and the next one 430 * @param timePassed The time passed since this Keyframe began 431 432 @todo implement 433 433 */ 434 434 void Animation3D::rCosine(float timePassed) const … … 443 443 444 444 /** 445 \briefan exponential interpolation between this keyframe and the next one446 \param timePassed The time passed since this Keyframe began445 * an exponential interpolation between this keyframe and the next one 446 * @param timePassed The time passed since this Keyframe began 447 447 */ 448 448 void Animation3D::rExp(float timePassed) const … … 452 452 453 453 /** 454 \briefa negative exponential interpolation between this keyframe and the next one455 \param timePassed The time passed since this Keyframe began454 * a negative exponential interpolation between this keyframe and the next one 455 * @param timePassed The time passed since this Keyframe began 456 456 */ 457 457 void Animation3D::rNegExp(float timePassed) const … … 465 465 466 466 /** 467 \briefa quadratic interpolation between this keyframe and the next one468 \param timePassed The time passed since this Keyframe began469 470 \todo implement467 * a quadratic interpolation between this keyframe and the next one 468 * @param timePassed The time passed since this Keyframe began 469 470 @todo implement 471 471 */ 472 472 void Animation3D::rQuadratic(float timePassed) const … … 476 476 477 477 /** 478 \briefsome random animation (fluctuating)479 \param timePassed The time passed since this Keyframe began478 * some random animation (fluctuating) 479 * @param timePassed The time passed since this Keyframe began 480 480 */ 481 481 void Animation3D::rRandom(float timePassed) const -
orxonox/trunk/src/util/animation/animation_player.cc
r4746 r4836 24 24 25 25 /** 26 \briefstandard constructor26 * standard constructor 27 27 */ 28 28 AnimationPlayer::AnimationPlayer () … … 36 36 37 37 /** 38 \briefthe singleton reference to this class38 * the singleton reference to this class 39 39 */ 40 40 AnimationPlayer* AnimationPlayer::singletonRef = NULL; 41 41 42 42 /** 43 \briefstandard deconstructor43 * standard deconstructor 44 44 45 45 !! DANGER !! when unloading the AnimationPlayer no other Function … … 58 58 59 59 /** 60 \briefadds an Animation to the AnimationList.61 \param animation the Animation to handle60 * adds an Animation to the AnimationList. 61 * @param animation the Animation to handle 62 62 63 63 when adding a Animation the Animation will too be deleted when … … 71 71 72 72 /** 73 \briefremoves an Animation from the Animation List, WITHOUT deleting it.74 \param animation the Anmination to remove from the List73 * removes an Animation from the Animation List, WITHOUT deleting it. 74 * @param animation the Anmination to remove from the List 75 75 */ 76 76 void AnimationPlayer::removeAnimation(Animation* animation) … … 80 80 81 81 /** 82 \briefempties the list AND deletes all the Animations82 * empties the list AND deletes all the Animations 83 83 */ 84 84 void AnimationPlayer::flush() … … 100 100 101 101 /** 102 \briefTicks all the animations in animationList103 \param timePassed the time passed since the last tick.102 * Ticks all the animations in animationList 103 * @param timePassed the time passed since the last tick. 104 104 */ 105 105 void AnimationPlayer::tick(float timePassed) … … 124 124 } 125 125 /** 126 \briefstarts playing the AnimationPlayer126 * starts playing the AnimationPlayer 127 127 */ 128 128 void AnimationPlayer::play() … … 132 132 133 133 /** 134 \briefpauses playing of the AnimationPlayer134 * pauses playing of the AnimationPlayer 135 135 */ 136 136 void AnimationPlayer::pause() … … 140 140 141 141 /** 142 \returns the animation from a certain baseobject142 * @returns the animation from a certain baseobject 143 143 if multiple are found, it just retruns the first one 144 144 if none is found it returns NULL … … 164 164 165 165 /** 166 \briefOutputs some nice debug-information166 * Outputs some nice debug-information 167 167 */ 168 168 void AnimationPlayer::debug() -
orxonox/trunk/src/util/animation/animation_player.h
r4746 r4836 29 29 30 30 public: 31 /** \returns a Pointer to the only object of this Class */31 /** @returns a Pointer to the only object of this Class */ 32 32 inline static AnimationPlayer* getInstance() { if (!singletonRef) singletonRef = new AnimationPlayer(); return singletonRef; }; 33 33 -
orxonox/trunk/src/util/animation/t_animation.h
r4746 r4836 77 77 78 78 /** 79 \briefstandard constructor79 * standard constructor 80 80 */ 81 81 template<class T> … … 99 99 100 100 /** 101 \briefstandard deconstructor101 * standard deconstructor 102 102 103 103 deletes all the Keyframes … … 119 119 120 120 /** 121 \briefrewinds the Animation to the beginning (first KeyFrame and time == 0)121 * rewinds the Animation to the beginning (first KeyFrame and time == 0) 122 122 */ 123 123 template<class T> … … 131 131 132 132 /** 133 \briefsets the Function we want to animate134 \param object from what object do we want to animate135 \param funcToAnim which function133 * sets the Function we want to animate 134 * @param object from what object do we want to animate 135 * @param funcToAnim which function 136 136 */ 137 137 template<class T> … … 143 143 144 144 /** 145 \briefAppends a new Keyframe146 \param value the value of the new KeyFrame147 \param duration The duration from the new KeyFrame to the next one148 \param animFunc The function to animate between this keyFrame and the next one145 * Appends a new Keyframe 146 * @param value the value of the new KeyFrame 147 * @param duration The duration from the new KeyFrame to the next one 148 * @param animFunc The function to animate between this keyFrame and the next one 149 149 */ 150 150 template<class T> … … 181 181 182 182 /** 183 \briefticks the Animation184 \param dt how much time to tick183 * ticks the Animation 184 * @param dt how much time to tick 185 185 */ 186 186 template<class T> … … 217 217 218 218 /** 219 \briefSets The kind of Animation between this keyframe and the next one220 \param animFunc The Type of Animation to set219 * Sets The kind of Animation between this keyframe and the next one 220 * @param animFunc The Type of Animation to set 221 221 */ 222 222 template<class T> … … 259 259 // animation functions 260 260 /** 261 \briefstays at the value of the currentKeyFrame262 \param timePassed The time passed since this Keyframe began261 * stays at the value of the currentKeyFrame 262 * @param timePassed The time passed since this Keyframe began 263 263 */ 264 264 template<class T> … … 269 269 270 270 /** 271 \brieflinear interpolation between this keyframe and the next one272 \param timePassed The time passed since this Keyframe began271 * linear interpolation between this keyframe and the next one 272 * @param timePassed The time passed since this Keyframe began 273 273 */ 274 274 template<class T> … … 280 280 281 281 /** 282 \briefa Sinusodial Interpolation between this keyframe and the next one283 \param timePassed The time passed since this Keyframe began282 * a Sinusodial Interpolation between this keyframe and the next one 283 * @param timePassed The time passed since this Keyframe began 284 284 */ 285 285 template<class T> … … 299 299 300 300 /** 301 \briefa cosine interpolation between this keyframe and the next one302 \param timePassed The time passed since this Keyframe began301 * a cosine interpolation between this keyframe and the next one 302 * @param timePassed The time passed since this Keyframe began 303 303 */ 304 304 template<class T> … … 311 311 312 312 /** 313 \briefan exponential interpolation between this keyframe and the next one314 \param timePassed The time passed since this Keyframe began313 * an exponential interpolation between this keyframe and the next one 314 * @param timePassed The time passed since this Keyframe began 315 315 */ 316 316 template<class T> … … 322 322 323 323 /** 324 \briefa negative exponential interpolation between this keyframe and the next one325 \param timePassed The time passed since this Keyframe began324 * a negative exponential interpolation between this keyframe and the next one 325 * @param timePassed The time passed since this Keyframe began 326 326 */ 327 327 template<class T> … … 334 334 335 335 /** 336 \briefa quadratic interpolation between this keyframe and the next one337 \param timePassed The time passed since this Keyframe began336 * a quadratic interpolation between this keyframe and the next one 337 * @param timePassed The time passed since this Keyframe began 338 338 */ 339 339 template<class T> … … 344 344 345 345 /** 346 \briefsome random animation (fluctuating)347 \param timePassed The time passed since this Keyframe began346 * some random animation (fluctuating) 347 * @param timePassed The time passed since this Keyframe began 348 348 */ 349 349 template<class T>
Note: See TracChangeset
for help on using the changeset viewer.