Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8551 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 17, 2006, 1:57:46 AM (18 years ago)
Author:
patrick
Message:

bsp: bone frame animation, slow start

Location:
branches/bsp_model/src/lib/graphics/importer/md3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc

    r8549 r8551  
    4040  this->parentTagIndex = -1;
    4141  this->parent = NULL;
     42
     43  this->animationState.currentFrame = 0;
     44  this->animationState.nextFrame = 1;
     45  this->animationState.interpolationFraction = 0.0f;
    4246
    4347  this->loadModel(modelFileName);
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc

    r8550 r8551  
    5656   */
    5757  void MD3Model::draw(MD3Data* data)
     58  {
     59    if( this->bDrawBones)
     60    {
     61      // get bone frame, interpolate if necessary
     62      if( data->animationState.interpolationFraction != 0.0 &&
     63          data->animationState.currentFrame != data->animationState.nextFrame) {
     64        //interpolate bone frame
     65        this->drawBoneFrame(this->interpolateBoneFrame(data->boneFrames[data->animationState.currentFrame],
     66                            data->boneFrames[data->animationState.nextFrame],
     67                            data->animationState.interpolationFraction));
     68      }
     69      else {
     70        //stick with current bone frame
     71        this->drawBoneFrame(data->boneFrames[data->animationState.currentFrame]);
     72      }
     73    }
     74
     75
     76
     77  }
     78
     79
     80  MD3BoneFrame MD3Model::interpolateBoneFrame(MD3BoneFrame* currBoneFrame, MD3BoneFrame* nextBoneFrame, float frac)
     81  {}
     82
     83
     84  void MD3Model::drawBoneFrame(MD3BoneFrame* frame)
    5885  {}
    5986
    6087
    6188
    62 
    6389}
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h

    r8550 r8551  
    1818
    1919class MD3Data;
     20class MD3BoneFrame;
    2021
    2122class MD3Model : public InteractiveModel
     
    3637    void draw(MD3Data* data);
    3738
     39    MD3BoneFrame* interpolateBoneFrame(MD3BoneFrame* currBoneFrame, MD3BoneFrame* nextBoneFrame, float frac);
     40    void drawBoneFrame(MD3BoneFrame* frame);
     41
    3842
    3943  private:
Note: See TracChangeset for help on using the changeset viewer.