Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4226 in orxonox.OLD for orxonox/branches/md2_loader/src


Ignore:
Timestamp:
May 19, 2005, 10:34:39 PM (20 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: got segfault, assuming problem in the verticesList interpolation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc

    r4225 r4226  
    514514 
    515515  this->textureID = 0;
    516   this->scaleFactor = 0.001f;
     516  this->scaleFactor = 1.0f;
    517517
    518518  this->setAnim(STAND);
     
    573573    {
    574574      /*
    575         faster but evt. buggy
     575      faster but evt. buggy
    576576      frame = (sFrame*)(buffer + header.frameSize * i);
    577577      pVertex = this->pVertices + this->numVertices  * i;
     
    589589          pVertex[j][2] = (frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2];
    590590         
    591           printf("pVertex %f, %f, %f\n", pVertex[j][0], pVertex[j][1], pVertex[j][2]);
     591          //printf("pVertex %f, %f, %f\n", pVertex[j][0], pVertex[j][1], pVertex[j][2]);
    592592
    593593          pNormals[j] = frame->pVertices[j].lightNormalIndex;
     
    623623  nextVec = &this->pVertices[this->numVertices * this->animationState.nextFrame];
    624624
    625     printf("currVec: %f, %f, %f\n", currVec[0][0], currVec[0][1], currVec[0][2]);
    626     printf("nextVec: %f, %f, %f\n", nextVec[0][0], nextVec[1][1], nextVec[2][2]);
     625  //printf("currVec: %f, %f, %f\n", currVec[0][0], currVec[0][1], currVec[0][2]);
     626  //printf("nextVec: %f, %f, %f\n", nextVec[0][0], nextVec[1][1], nextVec[2][2]);
    627627 
    628     printf("numFrames: %i\n", this->numFrames);
    629     printf("currentFrame: %i\n", this->animationState.currentFrame);
    630 
     628  //printf("numFrames: %i\n", this->numFrames);
     629  // printf("currentFrame: %i\n", this->animationState.currentFrame);
     630 
    631631    //for(int i = 0; i < this->numFrames; ++i)
    632632    for(int i = 0; i < this->numVertices; ++i)
     
    655655    type = 0;
    656656
    657 this->animationState.startFrame = animationList[type].firstFrame;
    658 this->animationState.endFrame = animationList[type].lastFrame;
    659 this->animationState.nextFrame = animationList[type].firstFrame + 1;
    660 this->animationState.fps = animationList[type].fps;
    661 this->animationState.type = type;
    662 
    663 this->animationState.interpolationState = 0.0;
    664 this->animationState.localTime = 0.0;
    665 this->animationState.lastTime = 0.0;
    666 this->animationState.currentFrame = animationList[type].firstFrame;
     657  this->animationState.startFrame = animationList[type].firstFrame;
     658  this->animationState.endFrame = animationList[type].lastFrame;
     659  this->animationState.nextFrame = animationList[type].firstFrame + 1;
     660  this->animationState.fps = animationList[type].fps;
     661  this->animationState.type = type;
     662 
     663  this->animationState.interpolationState = 0.0;
     664  this->animationState.localTime = 0.0;
     665  this->animationState.lastTime = 0.0;
     666  this->animationState.currentFrame = animationList[type].firstFrame;
    667667}
    668668
     
    761761  /* draw the triangles */
    762762  /* \todo: take int i out of while loop */
    763   while( false /*int i = *(pCommands++)*/) /* strange looking while loop for maximum performance */
     763  while( int i = *(pCommands++)) /* strange looking while loop for maximum performance */
    764764    {
    765765      int i;
Note: See TracChangeset for help on using the changeset viewer.