public Color3 samplePixel(int pixX, int pixY, Rectangle region, Camera camera)
        {
            double rayA = (double)(pixX + region.X) / (double)m_imageRect.Width;
            double rayB = (double)(pixY + region.Y) / (double)m_imageRect.Height;

            Ray ray = camera.getRay(rayA, rayB);

            RayContext rayContext = RayContext.startFromPixel(ray, pixX, pixY, m_scene, m_integrator);

            m_scene.shade(rayContext);

            return rayContext.resultColor;
        }
 public void setCamera(Camera cam)
 {
     camera = cam;
 }