Changeset 3975 in orxonox.OLD
- Timestamp:
- Apr 26, 2005, 2:02:13 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3972 r3975 477 477 animation->setInfinity(ANIM_INF_REPLAY); 478 478 479 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR );480 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_LINEAR );481 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR );479 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_SINE); 480 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_SINE); 481 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_SINE); 482 482 483 483 //animation->addKeyFrame(Vector(0, 0, 0), Quaternion(), 1.0, ANIM_LINEAR); -
orxonox/trunk/src/util/animation/animation3d.cc
r3973 r3975 374 374 void Animation3D::rSine(float timePassed) const 375 375 { 376 float scale; 377 if( timePassed < this->currentKeyFrame->duration / 2.0) 378 scale = sin( M_PI * timePassed / this->currentKeyFrame->duration); 379 else 380 scale = 1.0 - sin( M_PI * timePassed / this->currentKeyFrame->duration); 381 382 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 383 this->currentKeyFrame->direction, 384 scale) ); 376 385 } 377 386
Note: See TracChangeset
for help on using the changeset viewer.