Пример #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
        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);
        }