Changeset 8654 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer/md3
- Timestamp:
- Jun 21, 2006, 1:40:52 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
r8634 r8654 37 37 MD3Data::MD3Data(const std::string& modelFileName, const std::string& skinFileName, float scale) 38 38 { 39 this->filename = filename;39 this->filename = modelFileName; 40 40 41 41 this->parentTagIndex = -1; … … 45 45 this->animationState.nextFrame = 1; 46 46 this->animationState.interpolationFraction = 0.0f; 47 48 this->animation = NULL; 47 49 48 50 this->loadModel(modelFileName); -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8645 r8654 44 44 this->bDrawBones = false; 45 45 this->bDrawNormals = false; 46 47 // set the animation 48 this->interpolate(this->md3Data, this->config->getAnimation("Walk"), REWIND, true); 46 49 } 47 50 … … 93 96 else 94 97 PRINTF(0)("Could not add %s\n", nameLower.c_str()); 98 95 99 } 96 100 … … 119 123 void MD3Model::tick(float time) 120 124 { 125 if(this->md3Data == NULL) 126 return; 121 127 122 128 this->visit(this->md3Data); 123 124 129 this->tick(time, this->md3Data); 125 130 } … … 243 248 void MD3Model::draw() const 244 249 { 245 PRINTF(0)("\ndraw========================\n");246 250 //draw current bone frame 247 251 this->draw(this->md3Data); … … 331 335 void MD3Model::drawMesh(MD3Mesh* mesh, sVec3D* frame) const 332 336 { 333 PRINTF(0)("drawMesh: %s\n", mesh->header->name);334 337 Vector tmpVec1, tmpVec2; 335 338 … … 556 559 557 560 // visit children 558 std::map<int, MD3Data*>::iterator it = data->sortedMap.begin();559 while( it != data->sortedMap.end())560 {561 this->visit(it->second);562 it++;563 }561 // std::map<int, MD3Data*>::iterator it = data->sortedMap.begin(); 562 // while( it != data->sortedMap.end()) 563 // { 564 // this->visit(it->second); 565 // it++; 566 // } 564 567 } 565 568 -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
r8644 r8654 57 57 void tick(float dt, MD3Data* data); 58 58 59 59 60 void drawMesh(MD3Mesh* mesh, sVec3D* frame) const; 60 61 void drawVertexNormals(sVec3D* frame, MD3Normal* normals) const; 61 62 void drawBoneFrame(MD3BoneFrame* frame) const; 63 62 64 63 65 MD3BoneFrame* interpolateBoneFrame(MD3Data* data, MD3BoneFrame* currBoneFrame, MD3BoneFrame* nextBoneFrame, float frac); … … 66 68 float* interpolateTransformation(MD3Data* data, MD3Tag* currFrameTag, MD3Tag* nextFrameTag, float frac, int i); 67 69 70 71 void interpolate(MD3Data* data, MD3Animation* anim, int op, bool bInterpolate); 72 68 73 void visit(MD3Data* data); 69 void interpolate(MD3Data* data, MD3Animation* anim, int op, bool bInterpolate);70 74 int next(MD3Data* data, int nr); 71 75 int prev(MD3Data* data, int nr);
Note: See TracChangeset
for help on using the changeset viewer.