public override void calcbodysize() { MemoryStream m = new MemoryStream(); BinaryWriter br = new BinaryWriter(m); br.Write(lodMats.Count); for (int i = 0; i < lodMats.Count; i++) { Lod texturenames = lodMats[i]; br.Write(texturenames.mats.Count); for (int j = 0; j < texturenames.mats.Count; j++) br.WritePackString(texturenames.mats[j].DiffuseTextureName); } size = Convert.ToInt32( br.BaseStream.Position); br.Close(); }
public override void saveheader(BinaryWriter br) { br.WritePackString(name); br.Write(offset); br.Write(forsavingformat); calcheadersize(); br.Write(headersize); calcbodysize(); br.Write(size); }
public override void savebody(BinaryWriter br) { br.Write(lodMats.Count); for (int i = 0; i < lodMats.Count; i++) { Lod texturenames = lodMats[i]; br.Write(texturenames.mats.Count); for (int j = 0; j < texturenames.mats.Count; j++) { br.WritePackString(texturenames.mats[j].DiffuseTextureName); } } }
public override void saveheader(BinaryWriter bw) { bw.WritePackString(name); bw.Write(offset); bw.Write(ElementType.CollisionMesh); calcheadersize(); bw.Write(headersize); calcbodysize(); bw.Write(size); }
public override void savebody(BinaryWriter bw) { bw.WritePackString(name); bw.Write(Names.Count); foreach (var meshName in Names) { bw.WritePackString(meshName); } }
public override void saveheader(BinaryWriter bw) { bw.WritePackString(name); bw.Write(offset); bw.Write(ElementType.PNGTexture); calcheadersize(); bw.Write(headersize); bw.Write(data.Length); }