Changeset 8573 in orxonox.OLD for branches/bsp_model/src/lib/graphics
- Timestamp:
- Jun 18, 2006, 10:48:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc
r8551 r8573 336 336 fread(this->meshes[mesh]->triangles, 1, sizeof(MD3Triangle) * this->meshes[mesh]->header->triangleNum, pFile); 337 337 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 338 343 return this->meshes[mesh]->header->triangleNum * sizeof(MD3Triangle); 339 344 } … … 373 378 fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs) * this->meshes[mesh]->header->vertexNum, pFile); 374 379 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 375 384 return this->meshes[mesh]->header->vertexNum * sizeof(MD3TexVecs); 376 385 } … … 398 407 this->meshes[mesh]->meshFrames[i][2] = (float)vc->vector[2] / 64.0f; 399 408 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]); 402 414 403 415 delete vc; 404 416 } 405 417 406 // delete the temp memory again407 // delete vc;408 409 418 return this->meshes[mesh]->header->meshFrameNum * this->meshes[mesh]->header->vertexNum * sizeof(MD3VertexCompressed); 410 419 } 411 420 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.