public void SendToCuda()
 {
     CudaUtil.SendCamera(
         position.x, position.y, position.z,
         rotation.imaginaryPart.x, rotation.imaginaryPart.y, rotation.imaginaryPart.z, rotation.realPart,
         fov, aspectRatio, viewDistance, (int)Sampler.regular);
 }
        private void MainWnd_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                if (commonInfo.isInitialized)
                {
                    commonInfo.currentMouseX = e.X;
                    commonInfo.currentMouseY = e.Y;

                    commonInfo.accumulatedX += commonInfo.currentMouseX - commonInfo.lastMouseX;
                    commonInfo.accumulatedY += commonInfo.currentMouseY - commonInfo.lastMouseY;

                    commonInfo.lastMouseX = commonInfo.currentMouseX;
                    commonInfo.lastMouseY = commonInfo.currentMouseY;

                    //DebugLogger.Text = "X坐标: " + commonInfo.accumulatedX.ToString() + "Y坐标: " + commonInfo.accumulatedY.ToString();

                    commonInfo.scene.camera.Update(ref commonInfo);

                    CudaUtil.SendCamera(commonInfo.scene.camera);
                    WorkFlowUtil.Update(ref commonInfo);
                    switch (commonInfo.swampIdx)
                    {
                    case false: BackgroundImage = commonInfo.frameBuffer1; break;

                    case true: BackgroundImage = commonInfo.frameBuffer0; break;
                    }
                    WorkFlowUtil.RenderScene(ref commonInfo);
                    DebugLogger.Text = commonInfo.DebugInfo;
                }
                else
                {
                    DebugLogger.Text = "Scene还未初始化!还不能进行渲染,请按下I键进行初始化!";
                }
            }
        }