Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        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);
            }
        }