Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8657 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 3:02:27 AM (18 years ago)
Author:
patrick
Message:

bsp: md3 mesh messing up during animation

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

Legend:

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

    r8656 r8657  
    197197    //some adjustements:
    198198    if( anim->fps == 0)
    199       anim->fps = 33;
     199      anim->fps = 1;
    200200
    201201    PRINTF(0)("Animation: first frame: %i, num frames: %i, num loops: %i, fps: %i\n", anim->first, anim->numFrames, anim->numLoopFrames, anim->fps);
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc

    r8656 r8657  
    4848
    4949    // set the animation
    50     this->interpolate(this->md3Data, this->config->getAnimation("Dead 3"), MD3_ANIM_NEXT, false);
     50    this->interpolate(this->md3Data, this->config->getAnimation("Dead 1"), MD3_ANIM_NEXT, false);
    5151  }
    5252
     
    163163      MD3Mesh* mesh = data->meshes[i];
    164164
    165       // get mesh frame, do interpolation if necessary
    166       sVec3D* frame;
    167       if( data->animationState.interpolationFraction != 0.0 &&
    168           data->animationState.currentFrame != data->animationState.nextFrame)
    169       {
     165//       if( data->animationState.interpolationFraction != 0.0 &&
     166//           data->animationState.currentFrame != data->animationState.nextFrame)
     167//       {
    170168        //interpolate mesh frame between the 2 current mesh frames
    171 //         frame = this->interpolateMeshFrame( data,
    172 //                                             data->meshes[data->animationState.currentFrame]->meshFrames,
    173 //                                             data->meshes[data->animationState.nextFrame]->meshFrames,
    174 //                                             data->animationState.interpolationFraction, mesh, i);
    175         frame = this->interpolateMeshFrame( data,
    176                                             &mesh->meshFrames[data->animationState.currentFrame],
    177                                             &mesh->meshFrames[data->animationState.nextFrame],
    178                                             data->animationState.interpolationFraction, mesh, i);
    179       }
    180       else
    181       {
    182         //no interpolation needed, just draw current frame
    183         frame = &mesh->meshFrames[data->animationState.currentFrame];
    184       }
    185       data->tmpMesh[i] = frame;
     169        this->interpolateMeshFrame( data,
     170                                    &mesh->meshFrames[data->animationState.currentFrame],
     171                                    &mesh->meshFrames[data->animationState.nextFrame],
     172                                    data->animationState.interpolationFraction, mesh, i);
     173//       }
     174//       else
     175//       {
     176//         //no interpolation needed, just draw current frame
     177//         frame = &mesh->meshFrames[data->animationState.currentFrame];
     178//       }
    186179
    187180
     
    293286    {
    294287      MD3Mesh* mesh = data->meshes[i];
     288      sVec3D* frame = data->tmpMesh[i];
    295289
    296290      if( mesh->header->textureNum > 0 && &mesh->material[0] != NULL)
    297291        mesh->material[0].select();
    298 
    299       // get mesh frame, do interpolation if necessary
    300       sVec3D* frame = data->tmpMesh[i];
    301292
    302293      this->drawMesh(mesh, frame);
Note: See TracChangeset for help on using the changeset viewer.