Beispiel #1
0
 public override Spectrum SampleL(Point p, double pEpsilon, LightSample ls, double time, ref Vector wi, ref double pdf, ref VisibilityTester visibility)
 {
     wi = new Vector (LightDir);
     pdf = 1.0;
     visibility.SetRay (p, pEpsilon, wi, time);
     return L;
 }
Beispiel #2
0
        public override Spectrum SampleL(Point p, double pEpsilon, LightSample ls, double time, ref Vector wi, ref double pdf, ref VisibilityTester visibility)
        {
            Normal ns = new Normal ();
            Point ps = ShapeSet.Sample (p, ls, ref ns);
            wi = (ps - p).Normalized;
            pdf = ShapeSet.Pdf (p, wi);
            visibility.SetSegment (p, pEpsilon, ps, 0.001, time);
            Spectrum Ls = L (ps, ns, -wi);

            return Ls;
        }
Beispiel #3
0
 public abstract Spectrum SampleL(Point p, double pEpsilon, LightSample ls, double time, ref Vector wi, ref double pdf, ref VisibilityTester visibility);