void RendererMouseMove(object sender, MouseEventArgs args) { if (!Renderer.Capture) { return; } int x = args.X - LastMouseLocation.X; int y = args.Y - LastMouseLocation.Y; LastMouseLocation = args.Location; if ((args.Button & MouseButtons.Left) != 0) { WorldRotation *= new Rotation4d(Angle.Degrees(-x), Angle.Zero, Angle.Zero).ToMatrix4d(); WorldRotation *= new Rotation4d(Angle.Zero, Angle.Degrees(y), Angle.Zero).ToMatrix4d(); RefreshRenderer(); } else if ((args.Button & MouseButtons.Right) != 0) { ModelScale = Math.Max(1, ModelScale + x / 5.0); RefreshRenderer(); } }
void RendererMouseMove(object sender, MouseEventArgs args) { if (!Renderer.Capture) return; int x = args.X - LastMouseLocation.X; int y = args.Y - LastMouseLocation.Y; LastMouseLocation = args.Location; if ((args.Button & MouseButtons.Left) != 0) { WorldRotation *= new Rotation4d(Angle.Degrees(-x), Angle.Zero, Angle.Zero).ToMatrix4d(); WorldRotation *= new Rotation4d(Angle.Zero, Angle.Degrees(y), Angle.Zero).ToMatrix4d(); RefreshRenderer(); } else if ((args.Button & MouseButtons.Right) != 0) { ModelScale = Math.Max(1, ModelScale + x / 5.0); RefreshRenderer(); } }