Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }