public MaterialInfo(MaterialInfoReadStruct input) { this.MatId = input.MatId; this.Lod = input.Lod; this.MatUnk01 = input.MatUnk01; this.VertCount = input.VertCount; this.FaceStart = input.FaceStart; this.FaceCount = input.FaceCount; this.VertStart = input.VertStart; this.MeshName = ""; }
private void LoadMeshInfo() { int i; for (i = 0; i < this.mdlInfo.Count6; i++) { MaterialInfoReadStruct rs = this.br.ReadStruct <MaterialInfoReadStruct>(); this.fs.Seek(88, SeekOrigin.Current); long preName = this.fs.Position; string meshName = this.br.ReadASCIINullTerminatedString(); MaterialInfo mi = new MaterialInfo(rs); mi.MeshName = meshName; this.matInfoList.Add(mi); this.fs.Seek(preName + 272, SeekOrigin.Begin); } for (i = 0; i < this.mdlInfo.Count7; i++) { this.meshInfoList.Add(this.br.ReadStruct <MeshInfo>()); } this.vertBase = this.fs.Position; this.fs.Seek(this.mdlInfo.VertSize, SeekOrigin.Current); this.faceBase = this.fs.Position; this.fs.Seek(this.mdlInfo.FaceSize, SeekOrigin.Current); long fvfStart = this.fs.Position; for (i = 0; i < this.mdlInfo.Count7; i++) { List <FvfInfo> fvfTmp = new List <FvfInfo>(); short fvfEnd = 0; while (fvfEnd != -1) { FvfInfo fi = this.br.ReadStruct <FvfInfo>(); fvfEnd = fi.fvfEnd; fvfTmp.Add(fi); } this.fvfList.Add(fvfTmp.ToArray()); } fvfListEnd = this.fs.Position; this.loadMeshs(); }