Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8416 in orxonox.OLD for branches/bsp_model/src/lib


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

bsp: reading in the triangle 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

    r8383 r8416  
    284284int MD3Data::readMeshTriangles(FILE* pFile, int fileOffset, int mesh)
    285285{
    286 //   this->meshes[mesh]->triangles = new int[this->meshes[mesh]->header->triangleNum][3];
     286  // create the memomry to save the triangles
     287  MD3Triangle* tri = new MD3Triangle[this->meshes[mesh]->header->triangleNum];
     288  fread(tri, 1, sizeof(MD3Triangle), pFile);
     289
     290  return this->meshes[mesh]->header->triangleNum * sizeof(MD3Triangle);
    287291}
    288292
    289293int MD3Data::readMeshTextures(FILE* pFile, int fileOffset, int mesh)
    290 {}
     294{
     295  return 0;
     296}
    291297
    292298int MD3Data::readMeshTexVecs(FILE* pFile, int fileOffset, int mesh)
    293 {}
     299{
     300  return 0;
     301}
    294302
    295303int MD3Data::readMeshVertices(FILE* pFile, int fileOffset, int mesh)
    296 {}
    297 
    298 }
    299 
    300 
    301 
    302 
    303 
    304 
    305 
     304{
     305  return 0;
     306}
     307
     308}
     309
     310
     311
     312
     313
     314
     315
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_mesh.h

    r8382 r8416  
    3939  };
    4040
     41
     42  typedef struct MD3Triangle  {
     43    int  vertexOffset[3];
     44  };
     45
     46
    4147class MD3Mesh
    4248{
     
    5056
    5157    //MD3Texture*      textures;                //!< array of textures of size textureNum
    52     int**              triangles;               //!< indices into mesh frames and texture coord arrays
     58    MD3Triangle*       triangles;               //!< indices into mesh frames and texture coord arrays
    5359    float*             textureCoords;           //!< U/V textures coordinates of vertices
    5460    Vector             meshFrames;              //!< mesh frames
Note: See TracChangeset for help on using the changeset viewer.