void simulationTimer_Tick(object sender, EventArgs e) { if (bulletWrapper != null) { bulletWrapper.StepSimulation(1.0f / 60.0f); bulletController.UpdateSelection(); OnEachViewDo(view => view.Invalidate()); } }
void SwapMeshManipulation(MeshManipulationState old, MeshManipulationState current) { Trace.WriteLine("swapMeshManipulationWithOld:current:"); items.CurrentMeshManipulation = old; undo.PrepareUndo("Mesh Manipulation", Invocation.Create(current, old, SwapMeshManipulation)); itemsController.UpdateSelection(); meshController.UpdateSelection(); Manipulated = meshController; }
private void AddItem(MeshType type, uint steps) { Item item = new Item(); item.GetMesh().MakeMesh(type, steps); itemsController.ChangeSelection(0); item.Selected = 1; items.AddItem(item); itemsController.UpdateSelection(); OnEachViewDo(view => view.Invalidate()); undo.PrepareUndo(string.Format("Add {0}", type.ToDisplayString()), Invocation.Create(type, steps, RemoveItem)); }