public VoxelGeometry.MeshData createMeshData(string md5) { string key = VoxelDirector.GetKey(md5); VoxelGeometry.MeshData data = null; if (!GK7Zip.FileHas(key)) { data = VoxelDirector.CreateMeshData(this.voxel); VoxelDirector.SaveToFile(key, data); } else { data = VoxelDirector.LoadFromFile(key); } return(data); }
public static VoxelGeometry.MeshData CreateData(string md5, VoxelStruct vs) { string key = VoxelDirector.GetKey(md5); VoxelGeometry.MeshData data = null; if (!GK7Zip.FileHas(key)) { if (vs == null) { return(null); } data = VoxelDirector.CreateMeshData(vs); VoxelDirector.SaveToFile(key, data); } else { data = VoxelDirector.LoadFromFile(key); } return(data); }