Beispiel #1
0
        private void VSurface_MouseMove(object sender, MouseEventArgs e)
        {
            if (m_mouseDown)
            {
                if (m_oldMousePos != null)
                {
                    int movementX = Math.Abs(e.Location.X - m_oldMousePos.X);

                    if (e.Location.X > m_oldMousePos.X)
                    {
                        angleChange = true;
                        rightChange = true;
                    }
                    else
                    {
                        angleChange = true;
                        leftChange  = true;
                    }
                    RotateCamera(-movementX);
                    m_oldMousePos = e.Location;

                    if (initialize)
                    {
                        Draw();
                        VSurface.Refresh();
                    }
                }
            }
            else
            {
                m_oldMousePos = e.Location;
            }
        }
Beispiel #2
0
 private void VSurface_MouseWheel(object sender, MouseEventArgs e)
 {
     if (e.Delta > 0)
     {
         changeDistance = true;
         for (var repeat = 0; repeat < 3; repeat++)
         {
             ZoomOut();
         }
         if (initialize)
         {
             Draw();
             VSurface.Refresh();
         }
     }
     if (e.Delta < 0)
     {
         changeDistance = true;
         for (var repeat = 0; repeat < 3; repeat++)
         {
             ZoomIn();
         }
         if (initialize)
         {
             Draw();
             VSurface.Refresh();
         }
     }
 }
Beispiel #3
0
 private void tf_CheckedChanged(object sender, EventArgs e)
 {
     if (initialize)
     {
         Draw();
         VSurface.Refresh();
     }
 }
Beispiel #4
0
 internal void Idle()
 {
     if (initialize)
     {
         Draw();
         VSurface.Refresh();
     }
 }
Beispiel #5
0
 private void tracklz_Scroll(object sender, EventArgs e)
 {
     light.S2 = (float)tracklz.Value;
     lz.Text  = Convert.ToString(tracklz.Value);
     if (initialize)
     {
         Draw();
         VSurface.Refresh();
     }
 }
Beispiel #6
0
 private void trackmaxZ_Scroll(object sender, EventArgs e)
 {
     boxMaxCon.S2 = (float)(this.trackmaxZ.Value);
     maxZ.Text    = Convert.ToString(trackmaxZ.Value);
     if (initialize)
     {
         Draw();
         VSurface.Refresh();
     }
 }
Beispiel #7
0
 private void down_Click(object sender, EventArgs e)
 {
     changeDistance = true;
     ZoomOut();
     if (initialize)
     {
         Draw();
         VSurface.Refresh();
     }
 }
Beispiel #8
0
        private void trackminY_Scroll(object sender, EventArgs e)
        {
            boxMinCon.S1 = (float)(trackminY.Value);
            minY.Text    = Convert.ToString(trackminY.Value);

            if (initialize)
            {
                Draw();
                VSurface.Refresh();
            }
        }
Beispiel #9
0
        private void right_Click(object sender, EventArgs e)
        {
            angleChange = true;
            rightChange = true;
            RotateCamera();

            if (initialize)
            {
                Draw();
                VSurface.Refresh();
            }
        }
Beispiel #10
0
 private void VoxelImage_FormClosing(object sender, EventArgs e)
 {
     vol.ReturnBuffer().Dispose();
     color_buffer.Dispose();
     opacity.Dispose();
     manager.CQ[0].Dispose();
     kernel.Dispose();
     program.Dispose();
     manager.Context.Dispose();
     manager.Dispose();
     VSurface.Dispose();
     GC.Collect();
 }
Beispiel #11
0
 private void VSurface_Click(object sender, EventArgs e)
 {
     VSurface.Focus();
 }