Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8573 in orxonox.OLD


Ignore:
Timestamp:
Jun 18, 2006, 10:48:20 PM (18 years ago)
Author:
patrick
Message:

bsp: bug-hunting: md3 data read in correctly, no bugs here, expanding search

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc

    r8551 r8573  
    336336  fread(this->meshes[mesh]->triangles, 1, sizeof(MD3Triangle) * this->meshes[mesh]->header->triangleNum, pFile);
    337337
     338//   for( int i = 0; i < this->meshes[mesh]->header->triangleNum; i++) {
     339//     PRINTF(0)("Triangle read: %i, %i, %i\n", this->meshes[mesh]->triangles[i].vertexOffset[0], this->meshes[mesh]->triangles[i].vertexOffset[1]
     340//         , this->meshes[mesh]->triangles[i].vertexOffset[2]);
     341//   }
     342
    338343  return this->meshes[mesh]->header->triangleNum * sizeof(MD3Triangle);
    339344}
     
    373378  fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs) * this->meshes[mesh]->header->vertexNum, pFile);
    374379
     380//   for( int i = 0; i < this->meshes[mesh]->header->vertexNum; i++)  {
     381//     PRINTF(0)("TexVec read: %f, %f\n", this->meshes[mesh]->texVecs[i].textureCoord[0], this->meshes[mesh]->texVecs[i].textureCoord[0]);
     382//   }
     383
    375384  return this->meshes[mesh]->header->vertexNum * sizeof(MD3TexVecs);
    376385}
     
    398407    this->meshes[mesh]->meshFrames[i][2] = (float)vc->vector[2] / 64.0f;
    399408
    400     this->meshes[mesh]->normals[i].vertexNormal[0] = vc->vertexNormal[0];
    401     this->meshes[mesh]->normals[i].vertexNormal[1] = vc->vertexNormal[1];
     409    this->meshes[mesh]->normals[i].vertexNormal[0] = (int)vc->vertexNormal[0];
     410    this->meshes[mesh]->normals[i].vertexNormal[1] = (int)vc->vertexNormal[1];
     411
     412//     PRINTF(0)("nr: %i, meshframes: %f, %f, %f, normal: %f, %f\n", i, this->meshes[mesh]->meshFrames[i][0], this->meshes[mesh]->meshFrames[i][1],
     413//     this->meshes[mesh]->meshFrames[i][2], this->meshes[mesh]->normals[i].vertexNormal[0], this->meshes[mesh]->normals[i].vertexNormal[1]);
    402414
    403415    delete vc;
    404416  }
    405417
    406   // delete the temp memory again
    407 //   delete vc;
    408 
    409418  return this->meshes[mesh]->header->meshFrameNum * this->meshes[mesh]->header->vertexNum * sizeof(MD3VertexCompressed);
    410419}
    411420
    412 }
    413 
    414 
    415 
    416 
    417 
    418 
    419 
     421
     422
     423}
     424
     425
     426
     427
     428
     429
     430
Note: See TracChangeset for help on using the changeset viewer.