Exemplo n.º 1
0
        public RColor illumination(P3 point, P3 normal)
        {
            float  inten = this.p.Dot(normal);
            RColor color = new RColor(0, 0, 0);

            if (inten > 0)
            {
                color = c.Scale(inten);
                float       d;
                SceneObject s = Form1.shootRay(new Ray(point, this.p), out d);
                if (s != null)
                {
                    return(new RColor(0, 0, 0));
                }
            }
            return(color);
        }