public static void GetPreview(string filename, out Vector3I size, out BoundingBoxD contentBounds, out long voxCells, out bool isValid)
{
try
{
var map = new MyVoxelMap();
map.Load(filename, SpaceEngineersCore.Resources.GetDefaultMaterialName(), false);
size = map.Size;
contentBounds = map.BoundingContent;
voxCells = map.SumVoxelCells();
isValid = map.IsValid;
}
catch (Exception ex)
{
size = Vector3I.Zero;
contentBounds = new BoundingBoxD();
voxCells = 0;
isValid = false;
DiagnosticsLogging.LogWarning(string.Format(Res.ExceptionState_CorruptAsteroidFile, filename), ex);
}
}