Exemplo n.º 1
0
 public PathtracingNEE(int width, int height)
 {
     this.data = new CornellBoxSceneData(width, height);
     this.intersectionFinder = new IntersectionFinder(data.Triangles);
     this.width  = width;
     this.height = height;
 }
Exemplo n.º 2
0
 public SimpleRenderer(int width, int height)
 {
     this.data = new CornellBoxSceneData(width, height);
     this.intersectionFinder = new IntersectionFinder(data.Triangles);
     this.width  = width;
     this.height = height;
 }
Exemplo n.º 3
0
        public Photonmap(IntersectionFinder intersectionFinder, LightSource lightSource, int photonCount)
        {
            this.intersectionFinder = intersectionFinder;
            this.lightSource        = lightSource;
            this.photonCount        = photonCount;

            Random rand = new Random(0);

            List <Photon> photons = new List <Photon>();

            for (int i = 0; i < photonCount; i++)
            {
                photons.AddRange(TracePhoton(rand));
            }

            this.kdTree = new KdTree(photons.Cast <IPoint>().ToArray());
        }