Ejemplo n.º 1
0
        public Renderer(PictureBox pictureBox, Scene scene)
        {
            _loger = Context.Instance.Loger;

            _scene = scene;
            _scene.PrepareScene();

            //_loger.Log(Level.Verbose, _scene.BvhTree.GetStatistics());

            _pictureBox = pictureBox;

            int width = _scene.Camera.Width;
            int height = _scene.Camera.Height;

            pictureBox.Width = width;
            pictureBox.Height = height;
            _bitmap = new Bitmap(width, height);
            pictureBox.Image = _bitmap;

            _rayTracer = new Tracer.RayTracer(_scene);
        }