public PathtracingNEE(int width, int height) { this.data = new CornellBoxSceneData(width, height); this.intersectionFinder = new IntersectionFinder(data.Triangles); this.width = width; this.height = height; }
public SimpleRenderer(int width, int height) { this.data = new CornellBoxSceneData(width, height); this.intersectionFinder = new IntersectionFinder(data.Triangles); this.width = width; this.height = height; }
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()); }