public Scene(Camera camera, RayTracer rayTracer, Sampler sampler, Film film, string outPath) { _camera = camera; _rayTracer = rayTracer; _sampler = sampler; _film = film; OutPath = outPath; }
public Scene Build() { if (_rayTracer == null) { _rayTracer = new RayTracer(); } return(new Scene(_camera, _rayTracer, _sampler, _film, _outPath)); }
public SceneBuilder AddPrimitive(IPrimitive prim) { if (_rayTracer == null) { _rayTracer = new RayTracer(); } _rayTracer.Primitives.Add(prim); return(this); }
public SceneBuilder SetMaxDepth(int max) { if (_rayTracer == null) { _rayTracer = new RayTracer(); } _rayTracer.MaxDepth = 5; return(this); }
public SceneBuilder SetAttenuation(Attenuation att) { if (_rayTracer == null) { _rayTracer = new RayTracer(); } _rayTracer.Attenuation = att; return(this); }
public SceneBuilder AddLight(ILight light) { if (_rayTracer == null) { _rayTracer = new RayTracer(); } _rayTracer.Lights.Add(light); return(this); }
public SceneBuilder AddGeoPrimitive(IIntersect shape, Material mat) { if (_rayTracer == null) { _rayTracer = new RayTracer(); } _rayTracer.Primitives.Add(new GeometricPrimitive(shape, mat)); return(this); }
public SceneBuilder SetRayTracer(RayTracer raytracer) { _rayTracer = raytracer; return(this); }