Changeset 3829 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Apr 14, 2005, 2:33:47 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation.h
r3828 r3829 236 236 tmpKeyFrame->duration = duration; 237 237 tmpKeyFrame->animFunc = animFunc; 238 239 238 } 240 239 … … 261 260 this->nextKeyFrame = this->keyFrameList->nextElement(this->nextKeyFrame); 262 261 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 263 264 262 this->setAnimFunc(this->currentKeyFrame->animFunc); 265 263 } 266 264 … … 294 292 this->animFunc = &tAnim<T>::negExp; 295 293 break; 296 case ANIM_ SINE:294 case ANIM_QUADRATIC: 297 295 this->animFunc = &tAnim<T>::quadratic; 298 296 break; … … 329 327 float tAnim<T>::sine(float timePassed) const 330 328 { 331 return this->current keyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)329 return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value) 332 330 * sin(timePassed / this->currentKeyFrame->duration * M_PI); 333 331 } … … 336 334 float tAnim<T>::cosine(float timePassed) const 337 335 { 338 return this->current keyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)336 return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value) 339 337 * cos(timePassed / this->currentKeyFrame->duration * M_PI); 340 338 }
Note: See TracChangeset
for help on using the changeset viewer.