Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

bsp: md3 work flush

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

Legend:

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

    r8375 r8382  
    257257      if( localFileOffset == this->meshes[i]->header->triangleStart  && !bTriangles)
    258258      {
    259         localFileOffset += this->readMeshTriangles(pFile, localFileOffset);
     259        localFileOffset += this->readMeshTriangles(pFile, localFileOffset, i);
    260260        bTriangles = true;
    261261      }
    262262      else if( localFileOffset == this->meshes[i]->header->textureStart && !bTextures)
    263263      {
    264         fileOffset += this->readMeshTextures(pFile, localFileOffset);
     264        fileOffset += this->readMeshTextures(pFile, localFileOffset, i);
    265265        bTextures = true;
    266266      }
    267267      else if( localFileOffset == this->meshes[i]->header->texVecStart && !bTexVecs)
    268268      {
    269         localFileOffset += this->readMeshTexVecs(pFile, localFileOffset);
     269        localFileOffset += this->readMeshTexVecs(pFile, localFileOffset, i);
    270270        bTexVecs = true;
    271271      }
    272272      else if( fileOffset == this->meshes[i]->header->vertexStart && !bVertices)
    273273      {
    274         localFileOffset += this->readMeshVertices(pFile, localFileOffset);
     274        localFileOffset += this->readMeshVertices(pFile, localFileOffset, i);
    275275        bVertices = true;
    276276      }
     
    280280}
    281281
    282 }
    283 
     282
     283
     284int MD3Data::readMeshTriangles(FILE* pFile, int fileOffset, int mesh)
     285{
     286  this->meshes[mesh]->triangles = new int[this->meshes[mesh]->header->triangleNum][3];
     287}
     288
     289int MD3Data::readMeshTextures(FILE* pFile, int fileOffset, int mesh)
     290{}
     291
     292int MD3Data::readMeshTexVecs(FILE* pFile, int fileOffset, int mesh)
     293{}
     294
     295int MD3Data::readMeshVertices(FILE* pFile, int fileOffset, int mesh)
     296{}
     297
     298}
     299
     300
     301
     302
     303
     304
     305
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_data.h

    r8375 r8382  
    8989
    9090
    91    int readMeshTriangles(FILE* pFile, int fileOffset);
    92    int readMeshTextures(FILE* pFile, int fileOffset);
    93    int readMeshTexVecs(FILE* pFile, int fileOffset);
    94    int readMeshVertices(FILE* pFile, int fileOffset);
     91   int readMeshTriangles(FILE* pFile, int fileOffset, int mesh);
     92   int readMeshTextures(FILE* pFile, int fileOffset, int mesh);
     93   int readMeshTexVecs(FILE* pFile, int fileOffset, int mesh);
     94   int readMeshVertices(FILE* pFile, int fileOffset, int mesh);
    9595
    9696 public:
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_mesh.h

    r8374 r8382  
    5050
    5151    //MD3Texture*      textures;                //!< array of textures of size textureNum
    52     int*               triangles;               //!< indices into mesh frames and texture coord arrays
     52    int**              triangles;               //!< indices into mesh frames and texture coord arrays
    5353    float*             textureCoords;           //!< U/V textures coordinates of vertices
    5454    Vector             meshFrames;              //!< mesh frames
Note: See TracChangeset for help on using the changeset viewer.