예제 #1
0
        private IImageFunction getImageFunction(IRayScene sc, int width, int height)
        {
            IImageFunction imf = FormSupport.getImageFunction(sc, TextParam.Text);

            imf.Width  = width;
            imf.Height = height;

            if (imf is RayTracing rt)
            {
                rt.DoShadows     = checkShadows.Checked;
                rt.DoReflections = checkReflections.Checked;
                rt.DoRefractions = checkRefractions.Checked;
                rt.rayRegisterer = new MainRayRegisterer(additionalViews, rayVisualizer);
            }

            return(imf);
        }
예제 #2
0
파일: Form1.cs 프로젝트: pepcape/grcis
        private IImageFunction getImageFunction(IImageFunction imf)
        {
            if (imf == null) // The script didn't define an image-function..
            {
                imf = FormSupport.getImageFunction(TextParam.Text);
            }

            if (imf is RayTracing rt)
            {
                rt.DoShadows     = checkShadows.Checked;
                rt.DoReflections = checkReflections.Checked;
                rt.DoRefractions = checkRefractions.Checked;
                rt.rayRegisterer = new MainRayRegisterer(additionalViews, rayVisualizer);
            }

            return(imf);
        }