Esempio n. 1
0
 public Scene(List <Light> lights, List <GeometryObject> objectsList, ColorRGB Background, WindowFrame winFrame, Camera camera)
 {
     SetLights(lights);
     SetObjects(objectsList);
     background    = new ColorRGB(Background);
     this.winFrame = winFrame;
     finalPixels   = new ColorRGB[winFrame.width, winFrame.height];
     this.camera   = camera;
     tracer        = new Tracer(this);
     sampler       = new Regular(Config.NUM_OF_SAMPLES, Config.NUM_OF_SETS);
 }
Esempio n. 2
0
 public Scene(WindowFrame winFrame)
 {
     lightsList    = new List <Light>();
     objectsList   = new List <GeometryObject>();
     finalPixels   = new ColorRGB[winFrame.width, winFrame.height];
     this.winFrame = winFrame;
     background    = Config.DEFAULT_COLOR;
     this.camera   = new Perspective();
     tracer        = new Tracer(this);
     sampler       = new Regular(Config.NUM_OF_SAMPLES, Config.NUM_OF_SETS);
 }
Esempio n. 3
0
 public Scene(WindowFrame winFrame, string fileName, ColorRGB background, Camera camera)
 {
     lightsList      = new List <Light>();
     objectsList     = new List <GeometryObject>();
     finalPixels     = new ColorRGB[winFrame.width, winFrame.height];
     this.winFrame   = winFrame;
     tracer          = new Tracer(this);
     this.camera     = camera;
     this.fileName   = fileName;
     this.background = background;
     sampler         = new Regular(Config.NUM_OF_SAMPLES, Config.NUM_OF_SETS);
 }
Esempio n. 4
0
        public Scene(Scene sceneObj)
        {
            SetLights(sceneObj.lightsList);
            SetObjects(sceneObj.objectsList);

            if (sceneObj.background != null)
            {
                background = new ColorRGB(sceneObj.GetBackgroundColor());
            }

            winFrame    = sceneObj.winFrame;
            finalPixels = new ColorRGB[winFrame.width, winFrame.height];
            tracer      = sceneObj.tracer;
            camera      = sceneObj.camera;
            sampler     = sceneObj.sampler;
        }