public Illumination(Construction primitives, IRandomFactory randomFactory, TriangleSampler triangleSampler) { this.lights = new List <Triangle>(); this.primitives = primitives; this.randomFactory = randomFactory; this.triangleSampler = triangleSampler; }
public TriangleLocator(Mesh mesh, IPredicates predicates) { this.mesh = mesh; this.predicates = predicates; sampler = new TriangleSampler(mesh); }
public Engine(Matrix3D camera) { var ambient = 0.00; var diffuse = 0.95; var scale = 75; var distance = 100.0; this.camera = camera; this.screen = new Screen(width, height); this.window = new Window(width, height, scale, distance, camera); var randomFactory = new RandomFactory(); var hemiSamplerFactory = new HemiSamplerFactory(); var triangleSampler = new TriangleSampler(randomFactory); var primitives = new Construction(); var illumination = new Illumination(primitives, randomFactory, triangleSampler); var seedFactory = new Random(); this.tracer = new Tracer(primitives, new Emissive(Constant.WHITE, ambient, 1.0), randomFactory, hemiSamplerFactory); ExampleUtil.buildCornelBox(primitives, illumination, diffuse, tracer, randomFactory, hemiSamplerFactory); }