Changeset 4212 in orxonox.OLD for orxonox/branches/md2_loader/src/lib/graphics
- Timestamp:
- May 18, 2005, 2:06:17 AM (20 years ago)
- Location:
- orxonox/branches/md2_loader/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4211 r4212 511 511 512 512 this->textureID = 0; 513 this->scaleFactor = 1.0f;514 515 //this->setAnim(0);513 this->scaleFactor = 0.1f; 514 515 this->setAnim(0); 516 516 } 517 517 … … 568 568 for(int i = 0; i < this->numFrames; ++i) 569 569 { 570 /* 571 faster but evt. buggy 570 572 frame = (sFrame*)(buffer + header.frameSize * i); 571 573 pVertex = this->pVertices + this->numVertices * i; 572 574 pNormals = this->pLightNormals + this->numVertices * i; 575 */ 576 frame = (sFrame *)&buffer[header.frameSize * i]; 577 pVertex = &this->pVertices[this->numVertices * i]; 578 pNormals = &this->pLightNormals[this->numVertices * i]; 573 579 574 580 for(int j = 0; j < this->numVertices; ++j) … … 623 629 624 630 currVec = &this->pVertices[this->numVertices * this->animationState.currentFrame]; 625 nextVec = &this->pVertices[this->numVertices * this->animationState.currentFrame]; 626 631 nextVec = &this->pVertices[this->numVertices * this->animationState.nextFrame]; 632 633 //printf("currVec: %f, %f, %f\n", currVec[0][0], currVec[0][1], currVec[0][2]); 634 //printf("nextVec: %f, %f, %f\n", nextVec[0], nextVec[1], nextVec[2]); 635 627 636 for(int i = 0; i < this->numFrames; ++i) 628 637 { … … 697 706 698 707 this->processLighting(); 699 //this->interpolate(verticesList);708 this->interpolate(verticesList); 700 709 this->material->select(); 701 710 -
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h
r4188 r4212 193 193 void tick(float dtS); 194 194 195 void animate(float time); 195 196 private: 196 void animate(float time); 197 197 198 void processLighting(); 198 199 void interpolate(sVec3D* verticesList);
Note: See TracChangeset
for help on using the changeset viewer.