Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3970 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Apr 26, 2005, 1:03:11 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: testet quatSLERP, this function does not seem to work

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.cc

    r3966 r3970  
    435435/**
    436436   \brief performs a smooth move.
    437    \param from from where
    438    \param to to where
    439    \param t the time this transformation should take
     437   \param from where
     438   \param to where
     439   \param t the time this transformation should take value [0..1]
    440440
    441441   \returns the Result of the smooth move
  • orxonox/trunk/src/story_entities/world.cc

    r3967 r3970  
    476476            Animation3D* animation = new Animation3D(c);
    477477            animation->setInfinity(ANIM_INF_REPLAY);
    478             animation->addKeyFrame(Vector(0, 0, 0), Quaternion(), 1.0, ANIM_COSINE);
    479             animation->addKeyFrame(Vector(1, 1, -1), Quaternion(), 1.0, ANIM_COSINE);
    480             animation->addKeyFrame(Vector(0, 0, 0), Quaternion(), 1.0, ANIM_COSINE);
     478            animation->addKeyFrame(Vector(0, 0, 0), Quaternion(Vector(0,0,1), Vector(0,0,1)), 1.0, ANIM_LINEAR);
     479            animation->addKeyFrame(Vector(0, 2, 0), Quaternion(Vector(0,0,1), Vector(1,0,0)), 1.0, ANIM_LINEAR);
     480            //animation->addKeyFrame(Vector(0, 0, 0), Quaternion(), 1.0, ANIM_LINEAR);
    481481
    482482
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3968 r3970  
    134134      /* now animate it */
    135135      (this->*animFunc)(this->localTime);
    136  
    137136    }
    138137}
     
    203202                          (this->nextKeyFrame->position - this->currentKeyFrame->position) *
    204203                          (timePassed/this->currentKeyFrame->duration));
     204
     205  this->object->setRelDir( this->nextKeyFrame->direction.quatSlerp( this->nextKeyFrame->direction,
     206                                                                    this->currentKeyFrame->direction, timePassed /
     207                                                                    this->currentKeyFrame->duration) );
     208
    205209}
    206210
Note: See TracChangeset for help on using the changeset viewer.