Changeset 4235 in orxonox.OLD
- Timestamp:
- May 20, 2005, 1:58:07 AM (19 years ago)
- Location:
- orxonox/branches/md2_loader/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4234 r4235 562 562 this->pVertices = new sVec3D[this->numVertices * this->numFrames]; 563 563 this->pGLCommands = new int[this->numGLCommands]; 564 //this->pGLCommands2 = new int[this->numGLCommands];565 564 this->pLightNormals = new int[this->numVertices * this->numFrames]; 566 565 buffer = new char[this->numFrames * this->header->frameSize]; … … 572 571 fseek(pFile, this->header->offsetGlCommands, SEEK_SET); 573 572 fread(this->pGLCommands, sizeof(int), this->numGLCommands, pFile); 574 //fread(this->pGLCommands2, sizeof(glCommandVertex), this->numGLCommands, pFile);575 573 576 574 for(int i = 0; i < this->numFrames; ++i) … … 590 588 /* SPEEDUP: *(pVerts + i + 0) = (*(frame->pVertices + i + 0)... */ 591 589 pVertex[j][0] = (frame->pVertices[j].v[0] * frame->scale[0]) + frame->translate[0]; 592 pVertex[j][1] = (frame->pVertices[j].v[ 1] * frame->scale[1]) + frame->translate[1];593 pVertex[j][2] = (frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2];590 pVertex[j][1] = (frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2]; 591 pVertex[j][2] = -(frame->pVertices[j].v[1] * frame->scale[1]) + frame->translate[1]; 594 592 595 593 //printf("pVertex %f, %f, %f\n", pVertex[j][0], pVertex[j][1], pVertex[j][2]); … … 627 625 nextVec = &this->pVertices[this->numVertices * this->animationState.nextFrame]; 628 626 629 //printf("currVec: %f, %f, %f\n", currVec[0][0], currVec[0][1], currVec[0][2]); 630 //printf("nextVec: %f, %f, %f\n", nextVec[0][0], nextVec[1][1], nextVec[2][2]); 631 632 //printf("numFrames: %i\n", this->numFrames); 633 //printf("currentFrame: %i\n", this->animationState.currentFrame); 634 635 //for(int i = 0; i < this->numFrames; ++i) 636 for(int i = 0; i < this->numVertices; ++i) 627 for(int i = 0; i < this->numFrames; ++i) 628 //for(int i = 0; i < this->numVertices; ++i) 637 629 { 638 630 /* … … 646 638 verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1])) * this->scaleFactor; 647 639 verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2])) * this->scaleFactor; 648 649 650 //printf(" pVertices %f, %f, %f\n", pVertices[i][0], pVertices[i][1], pVertices[i][2]);651 //printf(" list: %f, %f, %f \n", verticesList[i][0], verticesList[i][1], verticesList[i][2]);652 640 } 653 641 } … … 715 703 /* rotate because id software uses another orientation then the openGL default */ 716 704 /* \todo: rotate the axis already when loading... easy :) */ 717 glRotatef(-90.0, 1.0, 0.0, 0.0);718 glRotatef(-90.0, 0.0, 0.0, 1.0);705 //glRotatef(-90.0, 1.0, 0.0, 0.0); 706 //glRotatef(-90.0, 0.0, 0.0, 1.0); 719 707 720 708 this->renderFrame(); -
orxonox/branches/md2_loader/src/story_entities/world.cc
r4215 r4235 488 488 489 489 WorldEntity* testEntity = new TestEntity(); 490 testEntity->setRelCoor(Vector(570, 10, -15)); 490 //testEntity->setRelCoor(Vector(570, 10, -15)); 491 testEntity->setRelCoor(Vector(25, -10, -20)); 491 492 testEntity->setRelDir(Quaternion(M_PI, Vector(0, 1, 0))); 492 493 this->spawn(testEntity); 493 //this->localPlayer->addChild(testEntity);494 this->localPlayer->addChild(testEntity); 494 495 495 496 }
Note: See TracChangeset
for help on using the changeset viewer.