예제 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            Visualization.ImageSize = Math.Min(pictureBox1.Width, pictureBox1.Height);
            if (Visualization.ImageSize > 0)
            {
                double delta = 0.05;
                switch (PressedButton)
                {
                case MouseButtons.Left:
                    Visualization.Th -= delta;
                    break;

                case MouseButtons.None:
                    break;

                case MouseButtons.Right:
                    Visualization.Th += delta;
                    break;

                case MouseButtons.Middle:
                    Visualization.Th = 0;
                    break;

                case MouseButtons.XButton1:
                    break;

                case MouseButtons.XButton2:
                    break;

                default:
                    break;
                }
                if (Visualization.Th > 2 * Math.PI)
                {
                    Visualization.Th -= 2 * Math.PI;
                }
                if (Visualization.Th < 0)
                {
                    Visualization.Th += 2 * Math.PI;
                }
                Visualization.CalcCameraPos();
                Visualization.RequestImage(SaveImageFlag.Checked);
            }
        }