Changeset 4189 in orxonox.OLD for orxonox/branches
- Timestamp:
- May 15, 2005, 10:59:26 PM (20 years ago)
- Location:
- orxonox/branches/md2_loader/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4188 r4189 627 627 for(int i = 0; i < this->numFrames; ++i) 628 628 { 629 /* 629 630 verticesList[i][0] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][0] * this->scaleFactor; 630 631 verticesList[i][1] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][1] * this->scaleFactor; 631 632 verticesList[i][2] = this->pVertices[i + (this->numFrames * this->animationState.currentFrame)][2] * this->scaleFactor; 633 */ 634 635 verticesList[i][0] = (currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0])) * this->scaleFactor; 636 verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1])) * this->scaleFactor; 637 verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2])) * this->scaleFactor; 632 638 } 633 639 } … … 637 643 void MD2Model2::processLighting() 638 644 { 639 shadeDots = anormsDots[ 645 shadeDots = anormsDots[((int)(md2Angle*(SHADEDOT_QUANT / 360.0)))&(SHADEDOT_QUANT - 1)]; 640 646 } 641 647 -
orxonox/branches/md2_loader/src/story_entities/world.cc
r4160 r4189 445 445 trackManager->addPoint(Vector(1770, 80, -40)); 446 446 trackManager->addPoint(Vector(1800, 100, -40)); 447 trackManager->setDuration(10); 447 trackManager->addPoint(Vector(2000, 100, -40)); 448 trackManager->setDuration(12); 448 449 449 450 trackManager->finalize(); -
orxonox/branches/md2_loader/src/world_entities/test_entity.cc
r4187 r4189 28 28 TestEntity::TestEntity () : WorldEntity() 29 29 { 30 this->md2Model = new MD2Model();30 //this->md2Model = new MD2Model(); 31 31 32 MD2Model2* model2 = new MD2Model2(); 33 model2->loadModel("../data/models/tris.md2"); 34 35 this->material = new Material("Clown"); 36 this->material->setDiffuseMap("../data/models/tris.pcx"); 37 this->material->setIllum(3); 38 this->material->setAmbient(1.0, 1.0, 1.0); 32 this->md2Model2 = new MD2Model2(); 33 this->md2Model2->loadModel("../data/models/tris.md2"); 34 this->md2Model2->loadSkin("../data/models/tris.pcx"); 39 35 } 40 36 … … 66 62 67 63 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 68 64 this->getAbsDir().matrix (matrix); 69 65 glMultMatrixf((float*)matrix); 70 66 71 67 72 68 /* TESTGING TESTING TESTING */ 73 this->material->select();69 //this->material->select(); 74 70 //this->md2Model->draw(this->model); 75 this->md2Model->animate(); 71 //this->md2Model->animate(); 72 73 this->md2Model2->draw(); 76 74 77 75 glPopMatrix(); -
orxonox/branches/md2_loader/src/world_entities/test_entity.h
r4159 r4189 6 6 class MD2Loader; 7 7 class MD2Model; 8 class MD2Model2; 8 9 struct t3DModel; 9 10 class Material; … … 28 29 t3DModel* model; 29 30 MD2Model* md2Model; 31 MD2Model2* md2Model2; 30 32 Material* material; 31 33
Note: See TracChangeset
for help on using the changeset viewer.