Exemplo n.º 1
0
 public Camera Camera(IAccelerator acc, Light[] lights, EnvironmentSettings es)
 {
     Camera cam = new Camera((int)this.Width, (int)this.Height, this.ScreenDistance, this.FoVH, acc, lights, es);
     cam.Position = this.Position;
     cam.LookAt = this.Lookat;
     cam.Roll = Roll;
     cam.MakeDirty();
     return cam;
 }
Exemplo n.º 2
0
 public RayTracer(IAccelerator acc, Light[] lights, EnvironmentSettings settings)
 {
     this.acc = acc;
     this.maxDepth = settings.RecursionDepth;
     this.rayCache = new Ray[maxDepth+0x01];
     for(int i = 0x00; i < this.maxDepth+0x01; i++) {
         this.rayCache[i] = new Ray(0.0d, 0.0d, 0.0d, 0.0d, 0.0d, 0.0d);
     }
     this.lights = lights;
     this.ambientColor = settings.AmbientColor.Color;
     this.EnvironmentMap = EnvironmentMaps.GetOrBlack(settings.EnvironmentMap);
     this.lightTest = settings.LightTest;
     this.sr = new Ray(new Point3(0.0d, 0.0d, 0.0d), dis);
     this.distanceUnit = settings.DistanceUnit;
 }
Exemplo n.º 3
0
		public Camera (int w, int h, double screenDistance, double foVH, IAccelerator acc, Light[] lights, EnvironmentSettings settings, List<CameraPostProcessor> postprocessors = null) {
			this.raster = new Texture(w, h);
			this.foVH = foVH;
			this.acc = acc;
			this.Lights = lights;
			this.antialiasSqrt = settings.AntiAliasingSqrt;
			this.dispersion = settings.Dispersion;
			this.dispersionAntialiasSqrt = settings.DispersingAntiAliasingSqrt;
			this.settings = settings;
			if(postprocessors != null) {
				this.postProcessors = postprocessors;
			}
			else {
				this.postProcessors = new List<CameraPostProcessor>();
			}
		}