Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3733 in orxonox.OLD for orxonox/trunk/src/simple_animation.cc


Ignore:
Timestamp:
Apr 6, 2005, 11:24:17 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: SimpleAnimation - the NEG_EXP function works also now.

File:
1 edited

Legend:

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

    r3732 r3733  
    5252   this->tmpVect = new Vector();
    5353   this->lastPosition = new Vector();
     54   this->deltaT = 0.2;
    5455}
    5556
     
    269270      this->currentFrame = this->frames->nextElement(this->currentFrame);
    270271      this->mode = this->currentFrame->mode;
     272      if( this->mode == NEG_EXP)
     273        {
     274          *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position;
     275          deltaT = 1/this->currentFrame->time * logf(1.0 + 100.0/this->tmpVect->len());
     276        }
    271277    }
    272278
     
    286292    case NEG_EXP:
    287293      *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position;
    288       *this->tmpVect = *this->tmpVect * (1 - exp(- this->localTime / this->currentFrame->time));     
     294      *this->tmpVect = *this->tmpVect * (1 - exp(- this->localTime * this->deltaT));     
    289295      this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect);
    290296      *this->lastPosition = *this->tmpVect;
Note: See TracChangeset for help on using the changeset viewer.