Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3975 in orxonox.OLD for orxonox/trunk/src/util


Ignore:
Timestamp:
Apr 26, 2005, 2:02:13 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: rotation sine function implemented, looks very fancy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3973 r3975  
    374374void Animation3D::rSine(float timePassed) const
    375375{
     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) );
    376385}
    377386
Note: See TracChangeset for help on using the changeset viewer.