| 1 | /* | 
|---|
| 2 |    orxonox - the future of 3D-vertical-scrollers | 
|---|
| 3 |  | 
|---|
| 4 |    Copyright (C) 2004 orx | 
|---|
| 5 |  | 
|---|
| 6 |    This program is free software; you can redistribute it and/or modify | 
|---|
| 7 |    it under the terms of the GNU General Public License as published by | 
|---|
| 8 |    the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 9 |    any later version. | 
|---|
| 10 |  | 
|---|
| 11 |    ### File Specific: | 
|---|
| 12 |    main-programmer: Patrick Boenzli | 
|---|
| 13 |    co-programmer: Benjamin Grauer | 
|---|
| 14 |  | 
|---|
| 15 |    2005-04-17: Benjamin Grauer | 
|---|
| 16 |           Rewritte all functions, so it will fit into the Animation-class | 
|---|
| 17 | */ | 
|---|
| 18 |  | 
|---|
| 19 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM | 
|---|
| 20 |  | 
|---|
| 21 | #include "animation3d.h" | 
|---|
| 22 |  | 
|---|
| 23 | #include "p_node.h" | 
|---|
| 24 |  | 
|---|
| 25 | using namespace std; | 
|---|
| 26 |  | 
|---|
| 27 | /** | 
|---|
| 28 |    \brief standard constructor | 
|---|
| 29 | */ | 
|---|
| 30 | Animation3D::Animation3D(PNode* object) | 
|---|
| 31 | { | 
|---|
| 32 |   this->object = object; | 
|---|
| 33 |  | 
|---|
| 34 |   // create a new List | 
|---|
| 35 |   this->keyFrameList = new tList<KeyFrame3D>(); | 
|---|
| 36 |   KeyFrame3D* tmpKeyFrame = new KeyFrame3D; | 
|---|
| 37 |   tmpKeyFrame->position = Vector(); | 
|---|
| 38 |   tmpKeyFrame->direction = Quaternion(); | 
|---|
| 39 |   keyFrameList->add(tmpKeyFrame); | 
|---|
| 40 |  | 
|---|
| 41 |   this->currentKeyFrame = tmpKeyFrame; | 
|---|
| 42 |   this->nextKeyFrame = tmpKeyFrame; | 
|---|
| 43 |  | 
|---|
| 44 |   this->animFuncMov = &Animation3D::mLinear; | 
|---|
| 45 |   this->animFuncRot = &Animation3D::rLinear; | 
|---|
| 46 | } | 
|---|
| 47 |  | 
|---|
| 48 | /** | 
|---|
| 49 |    \brief standard deconstructor | 
|---|
| 50 |     | 
|---|
| 51 |    deletes all the Keyframes | 
|---|
| 52 | */ | 
|---|
| 53 | Animation3D::~Animation3D(void) | 
|---|
| 54 | { | 
|---|
| 55 |   // delete all the KeyFrames | 
|---|
| 56 |   tIterator<KeyFrame3D>* itKF = keyFrameList->getIterator(); | 
|---|
| 57 |   KeyFrame3D*  enumKF = itKF->nextElement(); | 
|---|
| 58 |   while (enumKF) | 
|---|
| 59 |     { | 
|---|
| 60 |       delete enumKF; | 
|---|
| 61 |       enumKF = itKF->nextElement(); | 
|---|
| 62 |     } | 
|---|
| 63 |   delete itKF; | 
|---|
| 64 |   delete this->keyFrameList; | 
|---|
| 65 | } | 
|---|
| 66 |  | 
|---|
| 67 | /** | 
|---|
| 68 |    \brief rewinds the Animation to the beginning (first KeyFrame and time == 0) | 
|---|
| 69 | */ | 
|---|
| 70 | void Animation3D::rewind(void) | 
|---|
| 71 | { | 
|---|
| 72 |   this->currentKeyFrame = keyFrameList->firstElement(); | 
|---|
| 73 |   this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement()); | 
|---|
| 74 |   this->localTime = 0.0; | 
|---|
| 75 |   this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); | 
|---|
| 76 |   this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); | 
|---|
| 77 | } | 
|---|
| 78 |  | 
|---|
| 79 | /** | 
|---|
| 80 |    \brief Appends a new Keyframe | 
|---|
| 81 |    \param position The position of the new Keyframe | 
|---|
| 82 |    \param direction The direction of the new Keyframe. | 
|---|
| 83 |    \param duration The duration from the new KeyFrame to the next one | 
|---|
| 84 |    \param animFuncMov The function to animate position between this keyFrame and the next one | 
|---|
| 85 |    \param animFuncMov The function to animate rotation between this keyFrame and the next one | 
|---|
| 86 | */ | 
|---|
| 87 | void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration, ANIM_FUNCTION animFuncMov, ANIM_FUNCTION animFuncRot) | 
|---|
| 88 | { | 
|---|
| 89 |   // some small check | 
|---|
| 90 |   if (duration <= 0.0) | 
|---|
| 91 |     duration = 1.0; | 
|---|
| 92 |   // if the Rotation-Animation-function is set ANIM_NULL, animFuncRot will match animFuncRot | 
|---|
| 93 |   if (animFuncRot == ANIM_NULL) | 
|---|
| 94 |     animFuncRot = animFuncMov; | 
|---|
| 95 |  | 
|---|
| 96 |   KeyFrame3D* tmpKeyFrame; | 
|---|
| 97 |      | 
|---|
| 98 |   // when adding the first frame | 
|---|
| 99 |   if (this->keyFrameCount == 0) | 
|---|
| 100 |     { | 
|---|
| 101 |       tmpKeyFrame = this->keyFrameList->firstElement(); | 
|---|
| 102 |       this->setAnimFuncMov(animFuncMov); | 
|---|
| 103 |       this->setAnimFuncRot(animFuncRot); | 
|---|
| 104 |     } | 
|---|
| 105 |   else | 
|---|
| 106 |     { | 
|---|
| 107 |       tmpKeyFrame = new KeyFrame3D; | 
|---|
| 108 |       // when adding the second frame | 
|---|
| 109 |       if (this->currentKeyFrame == this->nextKeyFrame) | 
|---|
| 110 |         this->nextKeyFrame = tmpKeyFrame; | 
|---|
| 111 |       this->keyFrameList->add(tmpKeyFrame); | 
|---|
| 112 |     } | 
|---|
| 113 |  | 
|---|
| 114 |   tmpKeyFrame->position = position; | 
|---|
| 115 |   tmpKeyFrame->direction = direction; | 
|---|
| 116 |   tmpKeyFrame->duration = duration; | 
|---|
| 117 |   tmpKeyFrame->animFuncMov = animFuncMov; | 
|---|
| 118 |   tmpKeyFrame->animFuncRot = animFuncRot; | 
|---|
| 119 |   this->keyFrameCount++; | 
|---|
| 120 | } | 
|---|
| 121 |  | 
|---|
| 122 |  | 
|---|
| 123 |  | 
|---|
| 124 | /** | 
|---|
| 125 |    \brief ticks the Animation | 
|---|
| 126 |    \param dt how much time to tick | 
|---|
| 127 | */ | 
|---|
| 128 | void Animation3D::tick(float dt) | 
|---|
| 129 | { | 
|---|
| 130 |   if (this->bRunning) | 
|---|
| 131 |     {  | 
|---|
| 132 |       this->localTime += dt; | 
|---|
| 133 |       if (localTime >= this->currentKeyFrame->duration) | 
|---|
| 134 |         { | 
|---|
| 135 |           // switching to the next Key-Frame | 
|---|
| 136 |           this->localTime -= this->currentKeyFrame->duration; | 
|---|
| 137 |           this->currentKeyFrame = this->nextKeyFrame; | 
|---|
| 138 |           // checking, if we should still Play the animation | 
|---|
| 139 |           if (this->currentKeyFrame == this->keyFrameList->lastElement()) | 
|---|
| 140 |             this->handleInfinity(); | 
|---|
| 141 |           this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); | 
|---|
| 142 |           this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); | 
|---|
| 143 |           this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); | 
|---|
| 144 |         } | 
|---|
| 145 |       /* now animate it */ | 
|---|
| 146 |       (this->*animFuncMov)(this->localTime); | 
|---|
| 147 |       (this->*animFuncRot)(this->localTime); | 
|---|
| 148 |     } | 
|---|
| 149 | } | 
|---|
| 150 |  | 
|---|
| 151 |  | 
|---|
| 152 | /*==Movement Section==========================================================*/ | 
|---|
| 153 |  | 
|---|
| 154 | /** | 
|---|
| 155 |    \brief Sets The kind of movment Animation between this keyframe and the next one | 
|---|
| 156 |    \param animFunc The Type of Animation to set | 
|---|
| 157 | */ | 
|---|
| 158 | void Animation3D::setAnimFuncMov(ANIM_FUNCTION animFuncMov) | 
|---|
| 159 | { | 
|---|
| 160 |   switch (animFuncMov) | 
|---|
| 161 |     { | 
|---|
| 162 |     default: | 
|---|
| 163 |     case ANIM_CONSTANT: | 
|---|
| 164 |       this->animFuncMov = &Animation3D::mConstant; | 
|---|
| 165 |       break; | 
|---|
| 166 |     case ANIM_LINEAR: | 
|---|
| 167 |       this->animFuncMov = &Animation3D::mLinear; | 
|---|
| 168 |       break; | 
|---|
| 169 |     case ANIM_SINE: | 
|---|
| 170 |       this->animFuncMov = &Animation3D::mSine; | 
|---|
| 171 |       break; | 
|---|
| 172 |     case ANIM_COSINE: | 
|---|
| 173 |       this->animFuncMov = &Animation3D::mCosine; | 
|---|
| 174 |       break; | 
|---|
| 175 |     case ANIM_EXP: | 
|---|
| 176 |       this->animFuncMov = &Animation3D::mExp; | 
|---|
| 177 |       break; | 
|---|
| 178 |     case ANIM_NEG_EXP: | 
|---|
| 179 |       this->animFuncMov = &Animation3D::mNegExp; | 
|---|
| 180 |       this->expFactorMov = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); | 
|---|
| 181 |       break; | 
|---|
| 182 |     case ANIM_QUADRATIC: | 
|---|
| 183 |       this->animFuncMov = &Animation3D::mQuadratic; | 
|---|
| 184 |       break; | 
|---|
| 185 |     case ANIM_RANDOM: | 
|---|
| 186 |       this->animFuncMov = &Animation3D::mRandom; | 
|---|
| 187 |       break; | 
|---|
| 188 |     } | 
|---|
| 189 | } | 
|---|
| 190 |  | 
|---|
| 191 |  | 
|---|
| 192 |  | 
|---|
| 193 | /** | 
|---|
| 194 |    \brief stays at the value of the currentKeyFrame | 
|---|
| 195 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 196 | */ | 
|---|
| 197 | void Animation3D::mConstant(float timePassed) const | 
|---|
| 198 | { | 
|---|
| 199 |   this->object->setRelCoor(this->currentKeyFrame->position); | 
|---|
| 200 |  | 
|---|
| 201 |   /* | 
|---|
| 202 |     this->tmpVect = this->nextKeyFrame->position - this->currentKeyFrame->position; | 
|---|
| 203 |     this->tmpVect = this->tmpVect * this->localTime / this->currentKeyFrame->duration; | 
|---|
| 204 |     this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect); | 
|---|
| 205 |     this->lastPosition = this->tmpVect; | 
|---|
| 206 |   */ | 
|---|
| 207 | } | 
|---|
| 208 |  | 
|---|
| 209 | /** | 
|---|
| 210 |    \brief linear interpolation between this keyframe and the next one | 
|---|
| 211 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 212 |  | 
|---|
| 213 |    \todo implement also do this for direction | 
|---|
| 214 | */ | 
|---|
| 215 | void Animation3D::mLinear(float timePassed) const | 
|---|
| 216 | { | 
|---|
| 217 |   this->object->setRelCoor(this->currentKeyFrame->position + | 
|---|
| 218 |                           (this->nextKeyFrame->position - this->currentKeyFrame->position) *  | 
|---|
| 219 |                           (timePassed/this->currentKeyFrame->duration)); | 
|---|
| 220 |  | 
|---|
| 221 |   this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,  | 
|---|
| 222 |                                      this->currentKeyFrame->direction,  | 
|---|
| 223 |                                      timePassed/this->currentKeyFrame->duration) ); | 
|---|
| 224 |  | 
|---|
| 225 | } | 
|---|
| 226 |  | 
|---|
| 227 | /** | 
|---|
| 228 |    \brief a Sinusodial Interpolation between this keyframe and the next one | 
|---|
| 229 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 230 |  | 
|---|
| 231 |    \todo implement | 
|---|
| 232 | */ | 
|---|
| 233 | void Animation3D::mSine(float timePassed) const | 
|---|
| 234 | { | 
|---|
| 235 |   if( timePassed  < this->currentKeyFrame->duration/2.0) | 
|---|
| 236 |     this->object->setRelCoor( this->currentKeyFrame->position + (this->nextKeyFrame->position - this->currentKeyFrame->position) * | 
|---|
| 237 |                               sin( M_PI * timePassed /this->currentKeyFrame->duration) / 2.0); | 
|---|
| 238 |   else | 
|---|
| 239 |     this->object->setRelCoor( this->nextKeyFrame->position - (this->nextKeyFrame->position - this->currentKeyFrame->position) * | 
|---|
| 240 |                               sin( M_PI * (1.0 - timePassed /this->currentKeyFrame->duration) )/2.0); | 
|---|
| 241 | } | 
|---|
| 242 |  | 
|---|
| 243 |  | 
|---|
| 244 | /** | 
|---|
| 245 |    \brief a cosine interpolation between this keyframe and the next one | 
|---|
| 246 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 247 |  | 
|---|
| 248 |    \todo implement | 
|---|
| 249 | */ | 
|---|
| 250 | void Animation3D::mCosine(float timePassed) const | 
|---|
| 251 | { | 
|---|
| 252 |   this->object->setRelCoor( this->nextKeyFrame->position - | 
|---|
| 253 |                             (this->nextKeyFrame->position - this->currentKeyFrame->position) * | 
|---|
| 254 |                             (1.0 + cos( M_PI * timePassed / this->currentKeyFrame->duration))/2.0); | 
|---|
| 255 | } | 
|---|
| 256 |  | 
|---|
| 257 |  | 
|---|
| 258 |  | 
|---|
| 259 | /** | 
|---|
| 260 |    \brief an exponential interpolation between this keyframe and the next one | 
|---|
| 261 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 262 | */ | 
|---|
| 263 | void Animation3D::mExp(float timePassed) const | 
|---|
| 264 | { | 
|---|
| 265 |   PRINTF(0)("no exp animation3d defined\n"); | 
|---|
| 266 |   this->mLinear(timePassed); | 
|---|
| 267 | } | 
|---|
| 268 |  | 
|---|
| 269 | /** | 
|---|
| 270 |    \brief a negative exponential interpolation between this keyframe and the next one | 
|---|
| 271 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 272 | */ | 
|---|
| 273 | void Animation3D::mNegExp(float timePassed) const | 
|---|
| 274 | { | 
|---|
| 275 |   this->object->setRelCoor( this->currentKeyFrame->position + | 
|---|
| 276 |                             (this->nextKeyFrame->position - this->currentKeyFrame->position) *  | 
|---|
| 277 |                             (1.0 - expf(- timePassed * expFactorMov)) ); | 
|---|
| 278 | } | 
|---|
| 279 |  | 
|---|
| 280 |  | 
|---|
| 281 | /** | 
|---|
| 282 |    \brief a quadratic interpolation between this keyframe and the next one | 
|---|
| 283 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 284 |  | 
|---|
| 285 |    \todo implement | 
|---|
| 286 | */ | 
|---|
| 287 | void Animation3D::mQuadratic(float timePassed) const | 
|---|
| 288 | { | 
|---|
| 289 |   PRINTF(0)("no quadratic animation3d defined\n"); | 
|---|
| 290 |   this->mLinear(timePassed); | 
|---|
| 291 | } | 
|---|
| 292 |  | 
|---|
| 293 | /** | 
|---|
| 294 |    \brief some random animation (fluctuating) | 
|---|
| 295 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 296 | */ | 
|---|
| 297 | void Animation3D::mRandom(float timePassed) const | 
|---|
| 298 | { | 
|---|
| 299 |   this->object->setRelCoor(this->currentKeyFrame->position +  | 
|---|
| 300 |                            (this->nextKeyFrame->position - this->currentKeyFrame->position) * (float)rand()/(float)RAND_MAX); | 
|---|
| 301 |   this->object->setRelDir(this->currentKeyFrame->direction + | 
|---|
| 302 |                           (this->nextKeyFrame->direction - this->currentKeyFrame->direction)* (float)rand()/(float)RAND_MAX); | 
|---|
| 303 | } | 
|---|
| 304 |  | 
|---|
| 305 |  | 
|---|
| 306 | /*==Rotation Section==========================================================*/ | 
|---|
| 307 |  | 
|---|
| 308 |  | 
|---|
| 309 | /** | 
|---|
| 310 |    \brief Sets The kind of rotation Animation between this keyframe and the next one | 
|---|
| 311 |    \param animFunc The Type of Animation to set | 
|---|
| 312 | */ | 
|---|
| 313 | void Animation3D::setAnimFuncRot(ANIM_FUNCTION animFuncRot) | 
|---|
| 314 | { | 
|---|
| 315 |   switch (animFuncRot) | 
|---|
| 316 |     { | 
|---|
| 317 |    default: | 
|---|
| 318 |     case ANIM_CONSTANT: | 
|---|
| 319 |       this->animFuncRot = &Animation3D::rConstant; | 
|---|
| 320 |       break; | 
|---|
| 321 |     case ANIM_LINEAR: | 
|---|
| 322 |       this->animFuncRot = &Animation3D::rLinear; | 
|---|
| 323 |       break; | 
|---|
| 324 |     case ANIM_SINE: | 
|---|
| 325 |       this->animFuncRot = &Animation3D::rSine; | 
|---|
| 326 |       break; | 
|---|
| 327 |     case ANIM_COSINE: | 
|---|
| 328 |       this->animFuncRot = &Animation3D::rCosine; | 
|---|
| 329 |       break; | 
|---|
| 330 |     case ANIM_EXP: | 
|---|
| 331 |       this->animFuncRot = &Animation3D::rExp; | 
|---|
| 332 |       break; | 
|---|
| 333 |     case ANIM_NEG_EXP: | 
|---|
| 334 |       this->animFuncRot = &Animation3D::rNegExp; | 
|---|
| 335 |       this->expFactorRot = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); | 
|---|
| 336 |       break; | 
|---|
| 337 |     case ANIM_QUADRATIC: | 
|---|
| 338 |       this->animFuncRot = &Animation3D::rQuadratic; | 
|---|
| 339 |       break; | 
|---|
| 340 |     case ANIM_RANDOM: | 
|---|
| 341 |       this->animFuncRot = &Animation3D::rRandom; | 
|---|
| 342 |       break; | 
|---|
| 343 |     } | 
|---|
| 344 | } | 
|---|
| 345 |  | 
|---|
| 346 |  | 
|---|
| 347 | /** | 
|---|
| 348 |    \brief stays at the value of the currentKeyFrame | 
|---|
| 349 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 350 | */ | 
|---|
| 351 | void Animation3D::rConstant(float timePassed) const | 
|---|
| 352 | { | 
|---|
| 353 |   this->object->setRelDir(this->currentKeyFrame->direction); | 
|---|
| 354 | } | 
|---|
| 355 |  | 
|---|
| 356 | /** | 
|---|
| 357 |    \brief linear interpolation between this keyframe and the next one | 
|---|
| 358 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 359 |  | 
|---|
| 360 |    \todo implement also do this for direction | 
|---|
| 361 | */ | 
|---|
| 362 | void Animation3D::rLinear(float timePassed) const | 
|---|
| 363 | { | 
|---|
| 364 |   this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,  | 
|---|
| 365 |                                      this->currentKeyFrame->direction,  | 
|---|
| 366 |                                      timePassed/this->currentKeyFrame->duration) ); | 
|---|
| 367 | } | 
|---|
| 368 |  | 
|---|
| 369 | /** | 
|---|
| 370 |    \brief a Sinusodial Interpolation between this keyframe and the next one | 
|---|
| 371 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 372 |  | 
|---|
| 373 |    \todo implement | 
|---|
| 374 | */ | 
|---|
| 375 | void Animation3D::rSine(float timePassed) const | 
|---|
| 376 | { | 
|---|
| 377 |   float scale; | 
|---|
| 378 |   if( timePassed < this->currentKeyFrame->duration / 2.0) | 
|---|
| 379 |     scale = sin( M_PI * timePassed / this->currentKeyFrame->duration); | 
|---|
| 380 |   else | 
|---|
| 381 |     scale = 1.0 - sin( M_PI * timePassed / this->currentKeyFrame->duration); | 
|---|
| 382 |  | 
|---|
| 383 |   this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,  | 
|---|
| 384 |                                      this->currentKeyFrame->direction,  | 
|---|
| 385 |                                      scale) ); | 
|---|
| 386 | } | 
|---|
| 387 |  | 
|---|
| 388 |  | 
|---|
| 389 | /** | 
|---|
| 390 |    \brief a cosine interpolation between this keyframe and the next one | 
|---|
| 391 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 392 |  | 
|---|
| 393 |    \todo implement | 
|---|
| 394 | */ | 
|---|
| 395 | void Animation3D::rCosine(float timePassed) const | 
|---|
| 396 | { | 
|---|
| 397 |   float scale = cos(M_PI * timePassed / this->currentKeyFrame->duration); | 
|---|
| 398 |   this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,  | 
|---|
| 399 |                                      this->currentKeyFrame->direction,  | 
|---|
| 400 |                                      scale) ); | 
|---|
| 401 | } | 
|---|
| 402 |  | 
|---|
| 403 |  | 
|---|
| 404 |  | 
|---|
| 405 | /** | 
|---|
| 406 |    \brief an exponential interpolation between this keyframe and the next one | 
|---|
| 407 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 408 | */ | 
|---|
| 409 | void Animation3D::rExp(float timePassed) const | 
|---|
| 410 | { | 
|---|
| 411 |  | 
|---|
| 412 | } | 
|---|
| 413 |  | 
|---|
| 414 | /** | 
|---|
| 415 |    \brief a negative exponential interpolation between this keyframe and the next one | 
|---|
| 416 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 417 | */ | 
|---|
| 418 | void Animation3D::rNegExp(float timePassed) const | 
|---|
| 419 | { | 
|---|
| 420 |   float scale = (1.0 - expf(- timePassed * expFactorRot)); | 
|---|
| 421 |   this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,  | 
|---|
| 422 |                                      this->currentKeyFrame->direction,  | 
|---|
| 423 |                                      scale) ); | 
|---|
| 424 | } | 
|---|
| 425 |  | 
|---|
| 426 |  | 
|---|
| 427 | /** | 
|---|
| 428 |    \brief a quadratic interpolation between this keyframe and the next one | 
|---|
| 429 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 430 |  | 
|---|
| 431 |    \todo implement | 
|---|
| 432 | */ | 
|---|
| 433 | void Animation3D::rQuadratic(float timePassed) const | 
|---|
| 434 | { | 
|---|
| 435 | } | 
|---|
| 436 |  | 
|---|
| 437 | /** | 
|---|
| 438 |    \brief some random animation (fluctuating) | 
|---|
| 439 |    \param timePassed The time passed since this Keyframe began | 
|---|
| 440 | */ | 
|---|
| 441 | void Animation3D::rRandom(float timePassed) const | 
|---|
| 442 | { | 
|---|
| 443 | } | 
|---|