public void RemoveModel(Model model) { EditLayer layer = this.CurrentLayer; this.AddCommand(new Command( () => { layer.RemoveModel(model, true); }, () => { layer.AddModel(model); })); }
public void AddModel(Vector3 position, int rotation) { EditLayer layer = this.CurrentLayer; var modelShape = ModelShape.Find(this.toolModel); var model = new Model(modelShape, position, rotation); this.AddCommand(new Command( () => { layer.AddModel(model); }, () => { layer.RemoveModel(model, true); })); }