Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8420 in orxonox.OLD


Ignore:
Timestamp:
Jun 14, 2006, 11:19:52 PM (18 years ago)
Author:
patrick
Message:

bsp: reading the tex vecs informations

Location:
branches/bsp_model/src/lib/graphics/importer/md3
Files:
2 edited

Legend:

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

    r8418 r8420  
    323323int MD3Data::readMeshTexVecs(FILE* pFile, int fileOffset, int mesh)
    324324{
     325  this->meshes[mesh]->texVecs = new MD3TexVecs[this->meshes[mesh]->header->vertexNum];
     326  fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs), pFile);
     327
     328  return this->meshes[mesh]->header->vertexNum * sizeof(MD3TexVecs);
     329}
     330
     331
     332/**
     333 * reading in the mesh vertices
     334 */
     335int MD3Data::readMeshVertices(FILE* pFile, int fileOffset, int mesh)
     336{
    325337  return 0;
    326338}
    327339
    328 
    329 /**
    330  * reading in the mesh vertices
    331  */
    332 int MD3Data::readMeshVertices(FILE* pFile, int fileOffset, int mesh)
    333 {
    334   return 0;
    335 }
    336 
    337 }
    338 
    339 
    340 
    341 
    342 
    343 
    344 
     340}
     341
     342
     343
     344
     345
     346
     347
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_mesh.h

    r8418 r8420  
    4242
    4343  typedef struct MD3Triangle  {
    44     int  vertexOffset[3];                   //!< the vertex offsets of the triangles in the vertex array
     44    int     vertexOffset[3];                //!< the vertex offsets of the triangles in the vertex array
    4545  };
    4646
    4747  typedef struct MD3Texture {
    48     char fileName[68];                      //!< the filename of the texture. path relativly to the model file
     48    char    fileName[68];                   //!< the filename of the texture. path relativly to the model file
     49  };
     50
     51  typedef struct MD3TexVecs {
     52    float   textureCoord[2];                //!< the texture u/v coordinates
    4953  };
    5054
     
    6266    Material*          material;                //!< the material/textures of the models
    6367    MD3Triangle*       triangles;               //!< indices into mesh frames and texture coord arrays
     68    MD3TexVecs*        texVecs;                 //!< tex vecs coordinates
    6469
    6570    float*             textureCoords;           //!< U/V textures coordinates of vertices
Note: See TracChangeset for help on using the changeset viewer.