private void button20_Click(object sender, EventArgs e) { //Drop const constant -= 0.1; textBox15.Text = constant.ToString(); RenderButton(); VectorFields.Refresh(); }
private void button12_Click(object sender, EventArgs e) { x_rotated = 0; y_rotated = 0; y_offset = 0; z_offset = 0; RenderButton(); VectorFields.Refresh(); }
private void button16_Click(object sender, EventArgs e) { if (x_rotated == -360) { x_rotated = 0; } x_rotated -= 5; label18.Text = x_rotated.ToString(); VectorFields.Refresh(); }
private void button18_Click(object sender, EventArgs e) { //Rotate contrclockwise Y if (y_rotated == -360) { y_rotated = 0; } y_rotated -= 5; label19.Text = y_rotated.ToString(); VectorFields.Refresh(); }
private void button15_Click(object sender, EventArgs e) { //Rotate clockwise X if (x_rotated == 360) { x_rotated = 0; } x_rotated += 5; label18.Text = x_rotated.ToString(); VectorFields.Refresh(); }
private void radioButton23_CheckedChanged(object sender, EventArgs e) { if (radioButton23.Checked) { LightONF = true; } else { LightONF = false; } VectorFields.Refresh(); }
private void VectorFields_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { double dx = e.X - mousex; double dy = e.Y - mousey; if (x_rotated == -360 || x_rotated == 360) { x_rotated = 0; } if (y_rotated == -360 || y_rotated == 360) { y_rotated = 0; } x_rotated += dy; y_rotated += dx; label18.Text = x_rotated.ToString(); label19.Text = y_rotated.ToString(); mousey = e.Y; mousex = e.X; VectorFields.Refresh(); } }
private void button22_Click(object sender, EventArgs e) { //Down y_offset += 0.2; VectorFields.Refresh(); }
private void button21_Click(object sender, EventArgs e) { //Up y_offset -= 0.2; VectorFields.Refresh(); }
private void button14_Click(object sender, EventArgs e) { //Zoom out z_offset -= 0.2; VectorFields.Refresh(); }
private void VectorFields_KeyPress(object sender, KeyPressEventArgs e) { switch (e.KeyChar) { case 'w': { z_offset += 0.2; VectorFields.Refresh(); break; } case 's': { z_offset -= 0.2; VectorFields.Refresh(); break; } case 'd': { if (y_rotated == 360) { y_rotated = 0; } y_rotated += 5; label19.Text = y_rotated.ToString(); VectorFields.Refresh(); break; } case 'a': { if (y_rotated == -360) { y_rotated = 0; } y_rotated -= 5; label19.Text = y_rotated.ToString(); VectorFields.Refresh(); break; } case 'y': { if (x_rotated == 360) { x_rotated = 0; } x_rotated += 5; label18.Text = x_rotated.ToString(); VectorFields.Refresh(); break; } case 'h': { if (x_rotated == -360) { x_rotated = 0; } x_rotated -= 5; label18.Text = x_rotated.ToString(); VectorFields.Refresh(); break; } case '+': { constant += 0.1; textBox15.Text = constant.ToString(); RenderButton(); VectorFields.Refresh(); break; } case '-': { constant -= 0.1; textBox15.Text = constant.ToString(); RenderButton(); VectorFields.Refresh(); break; } } }