- Timestamp:
- Jun 17, 2006, 1:57:46 AM (18 years ago)
- 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 40 40 this->parentTagIndex = -1; 41 41 this->parent = NULL; 42 43 this->animationState.currentFrame = 0; 44 this->animationState.nextFrame = 1; 45 this->animationState.interpolationFraction = 0.0f; 42 46 43 47 this->loadModel(modelFileName); -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8550 r8551 56 56 */ 57 57 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) 58 85 {} 59 86 60 87 61 88 62 63 89 } -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
r8550 r8551 18 18 19 19 class MD3Data; 20 class MD3BoneFrame; 20 21 21 22 class MD3Model : public InteractiveModel … … 36 37 void draw(MD3Data* data); 37 38 39 MD3BoneFrame* interpolateBoneFrame(MD3BoneFrame* currBoneFrame, MD3BoneFrame* nextBoneFrame, float frac); 40 void drawBoneFrame(MD3BoneFrame* frame); 41 38 42 39 43 private:
Note: See TracChangeset
for help on using the changeset viewer.