Beispiel #1
0
 public PhotonTracer(Scene scene, RenderStrategy renderStrategy, int maxPhotons)
     : base(scene, renderStrategy)
 {
     this.scene = scene;
     this.maxPhotons = maxPhotons;
     this.indirectEnlightenment = new PhotonMap(maxPhotons);
     this.causticsEnlightenment = new PhotonMap(maxPhotons);
     this.buildPhotonMaps = true;
     this.scene.Primitives.CollectionChanged += Primitives_CollectionChanged;
     this.scene.Lights.CollectionChanged += Lights_CollectionChanged;
     this.scene.Materials.CollectionChanged += Materials_CollectionChanged;
 }
Beispiel #2
0
 protected RayCasting(Scene scene, RenderStrategy renderStrategy)
 {
     this.scene = scene;
     this.maxDepth = 5;
     this.RenderStrategy = renderStrategy;
 }
Beispiel #3
0
 public Scene(RGBColor iamb, NameableCollection<Light> lights, Camera defaultCamera, float refractIndice)
 {
     this.IAmb = iamb;
     this.RefractIndex = refractIndice;
     if (lights != null) {
         this.Lights = new NameableCollection<Light>(lights);
     } else {
         this.Lights = new NameableCollection<Light>();
     }
     this.primitives = new NameableCollection<Primitive>();
     this.AccelerationStructure = new KDTreePrimitiveManager(this.primitives as IList<Primitive>);
     this.materials = new NameableCollection<Material>();
     this.DefaultCamera = defaultCamera;
     this.Cameras = new NameableCollection<Camera>();
     if (defaultCamera != null) {
         this.Cameras.Add(defaultCamera);
     }
     this.sampler = new JitteredSampler();
     this.shader = new PhongShader(this);
     this.renderStrategy = new ScanlineRenderStrategy();
     this.isShadowActive = false;
     this.softShadowSamples = 8;
     this.glossySamples = 8;
     //this.cameras.CollectionChanged += new NotifyCollectionChangedEventHandler<Camera>(cameras_CollectionChanged);
 }
Beispiel #4
0
 public RayTracer(Scene scene, RenderStrategy renderStrategy)
     : base(scene, renderStrategy)
 {
 }
 public DistributedRayTracer(Scene scene, RenderStrategy renderStrategy)
     : base(scene, renderStrategy)
 {
 }