public void LoadNewModel() { Model = new VoxelEditorObject(new VoxelObject(1f)); voxelGrid = new VoxelGridObject(Model); Camera.Active.Position = Vector3.Zero; Camera.Active.SetTarget(Model.CenterPosition); Window.UpdateTitle(null); CurrentFile = null; }
public void LoadModel(string name) { VoxelObject tmpObj = null; if (VoxelIO.Load(name, out tmpObj)) { Model = new VoxelEditorObject(tmpObj); Window.UpdateTitle(name); CurrentFile = name; if (voxelGrid != null) { voxelGrid.Dispose(); } voxelGrid = new VoxelGridObject(Model); Camera.Active.SetTarget(Model.CenterPosition); } }