Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2005, 10:30:39 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_model: yea! animation now works :), orxonox now supports md2 loading and md2 animation playing. There is still a lot of work to do: cleaning up code and tie it closer to the orxonox framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc

    r4162 r4163  
    9797{
    9898  /* stretch the time with animation speed (and make seconds out of it) */
    99   float t = this->dtS / (1000.0f / kAnimationSpeed);
    100        
    101   if ( unlikely(this->dtS >= (1000.0f / kAnimationSpeed)) )
     99  //float t = this->dtS / kAnimationSpeed;
     100       
     101  if ( unlikely(this->localTime*1000.0 >=  1000.0/kAnimationSpeed) )
     102    {
    102103      pModel->currentFrame = nextFrame;
    103   return t;
     104      printf("changing frame\n");
     105      this->localTime = 0.0f;
     106    }
     107  printf("t = %f\n", this->localTime);
     108  return (this->localTime/kAnimationSpeed);
    104109}
    105110
     
    109114  /* TEMP TEMP TEMP: save the current step length */
    110115  this->dtS = dtS;
     116  this->localTime += dtS;
    111117}
    112118
Note: See TracChangeset for help on using the changeset viewer.