public void TranslateSceneWithMouse(Vector mouseMovement) { ActiveRenderer.Scene.Camera.Move(new Vector3D(mouseMovement.X / 50, 0, -mouseMovement.Y / 50)); UpdateManipulatorInfo(); ActiveRenderer.ForceRedraw(); }
public void ScaleWithMouse(int delta) { ActiveRenderer.Scene.Camera.Zoom += delta * 0.002; UpdateManipulatorInfo(); ActiveRenderer.ForceRedraw(); }
private void LoadScene() { var result = MessageBox.Show( _ownerWindow, "Loading a scene will clear this one. Are you sure?", "New scene confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question ); if (result == MessageBoxResult.No) { return; } var ofd = new OpenFileDialog(); var fileResult = ofd.ShowDialog(); if (fileResult == false) { return; } CreateNewScene(); _scene.Import(ofd.FileName); ActiveRenderer.ForceRedraw(); }
public void RotateSceneWithMouse(Vector mouseMovement) { var rotation = new Vector3D(-mouseMovement.Y / 50, -mouseMovement.X / 50, 0); ActiveRenderer.Scene.Camera.Rotate(rotation); UpdateManipulatorInfo(); ActiveRenderer.ForceRedraw(); }
public void MoveManipulator(double dx, double dy, double dz) { var shift = new Vector3D(dx, dy, dz); _scene.Manipulator.Translate(shift); foreach (var obj in _scene.GrabbedObjects) { obj.Translate(shift); } UpdateManipulatorInfo(); ActiveRenderer.ForceRedraw(); }
private void SceneCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { ActiveRenderer.ForceRedraw(); }
private void SceneChanged(object sender, PropertyChangedEventArgs e) { ActiveRenderer.ForceRedraw(); }