Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3852 in orxonox.OLD for orxonox/trunk/src/animation3d.cc


Ignore:
Timestamp:
Apr 17, 2005, 1:39:10 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: new Animation3D is now ready for setting up of the Functions

File:
1 edited

Legend:

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

    r3851 r3852  
    2727
    2828
    29 Animation3D::Animation3D(void)
    30 {
     29Animation3D::Animation3D(PNode* object)
     30{
     31  this->object = object;
     32
    3133  // create a new List
    3234  this->keyFrameList = new tList<KeyFrame3D>();
     
    9597}
    9698
    97 void Animation3D::tick(float timePassed)
     99void Animation3D::tick(float dt)
    98100{
    99101  if (this->bRunning)
    100102    {
    101       this->localTime += timePassed;
     103      this->localTime += dt;
    102104      if (localTime >= this->currentKeyFrame->duration)
    103105        {
     
    201203}
    202204
    203 float Animation3D::constant(float timePassed) const
    204 {
    205 
    206 }
    207 
    208 float Animation3D::linear(float timePassed) const
    209 {
    210 
    211 }
    212 
    213 float Animation3D::sine(float timePassed) const
    214 {
    215 
    216 }
    217 
    218 float Animation3D::cosine(float timePassed) const
    219 {
    220 
    221 }
    222 
    223 float Animation3D::exp(float timePassed) const
    224 {
    225 
    226 }
    227 
    228 float Animation3D::negExp(float timePassed) const
    229 {
    230 
    231 }
    232 
    233 float Animation3D::quadratic(float timePassed) const
    234 {
    235 
    236 }
    237 
    238 float Animation3D::random(float timePassed) const
    239 {
    240 
    241 }
     205void Animation3D::constant(float timePassed) const
     206{
     207  this->object->setRelCoor(this->currentKeyFrame->position);
     208
     209  /*
     210    this->tmpVect = this->nextKeyFrame->position - this->currentKeyFrame->position;
     211    this->tmpVect = this->tmpVect * this->localTime / this->currentKeyFrame->duration;
     212    this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect);
     213    this->lastPosition = this->tmpVect;
     214  */
     215}
     216
     217void Animation3D::linear(float timePassed) const
     218{
     219  this->object->setRelCoor(this->currentKeyFrame->position +
     220                          (this->nextKeyFrame->position - this->currentKeyFrame->position) *
     221                          (timePassed/this->currentKeyFrame->duration));
     222}
     223
     224void Animation3D::sine(float timePassed) const
     225{
     226
     227}
     228
     229void Animation3D::cosine(float timePassed) const
     230{
     231
     232}
     233
     234void Animation3D::exp(float timePassed) const
     235{
     236
     237}
     238
     239void Animation3D::negExp(float timePassed) const
     240{
     241
     242}
     243
     244void Animation3D::quadratic(float timePassed) const
     245{
     246
     247}
     248
     249void Animation3D::random(float timePassed) const
     250{
     251
     252}
Note: See TracChangeset for help on using the changeset viewer.