Ejemplo n.º 1
0
 /// <summary>
 /// Constructs the Object containing target bitmap, rectangle and raytracer to use.
 /// </summary>
 /// <param name="rawData">Pointer to the first element of the bitmap raw data.</param>
 /// <param name="startX">The lower bound of the x values in the rectangle.</param>
 /// <param name="endX">The upper bound of the x values in the rectangle.</param>
 /// <param name="startY">The lower bound of the y values in the rectangle.</param>
 /// <param name="endY">The upper bound of the y values in the rectangle.</param>
 /// <param name="raytracer">The raytracer to be used to render the image.</param>
 public RenderSection(byte[] rawData, int startX, int endX, int startY, int endY, Raytracer raytracer, OriginMode origin)
 {
     this.rawData   = rawData;
     this.startX    = startX;
     this.endX      = endX;
     this.startY    = startY;
     this.endY      = endY;
     this.raytracer = raytracer;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs a Renderer object.
 /// </summary>
 /// <param name="raytracer">The Raytracer to be used. Has to be fully initialized.</param>
 public Renderer(Raytracer raytracer)
 {
     this.settings    = raytracer.Settings;
     this.raytracer   = raytracer;
     this.frameBuffer = new byte[3 * settings.Resolution.width * settings.Resolution.height];
 }