// OptimizeMesh.cpp: implementation of the COptimizeMesh class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "worldcreator.h" #include "OptimizeMesh.h" #include "Vertex.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// COptimizeMesh::COptimizeMesh() { } COptimizeMesh::~COptimizeMesh() { } void COptimizeMesh::Load(char *strFilename,int mode) { FILE *fp=fopen(strFilename,"rb"); int nObject,nMat,TextureSize; fread(&nObject,sizeof(int),1,fp); fread(&nMat,sizeof(int),1,fp); fread(&TextureSize,sizeof(int),1,fp); char *strTextureName; List TextureNameList; for(int i=0;i VertexList; List IndexList; List nVertexList; List nIndexList; List MatRefList; for(i=0;i