Module raytracer

Interface Renderer

All Known Implementing Classes:
BidirectionalRenderer, MetropolisRenderer, PixelwiseRenderer

public interface Renderer
This interface specifies the basic operations for a renderer.
Author:
Ole Kniemeyer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Initializes the renderer.
    void
    render(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs)
    Renders an image of a scene.
    void
    This method is invoked from another thread to stop a running renderer.
  • Method Details

    • initialize

      void initialize(Options opts, ProgressMonitor progress)
      Initializes the renderer. This method has to be invoked at first.
      Parameters:
      opts - options to use (may be null)
      progress - monitor to display rendering progress (may be null)
    • render

      void render(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs)
      Renders an image of a scene.
      Parameters:
      scene - scene to render
      camera - camera to use
      cameraTransformation - transformation from camera coordinates to world coordinates
      width - width of image
      height - height of image
      obs - the observer receives the image data
    • stop

      void stop()
      This method is invoked from another thread to stop a running renderer. The renderer should stop rendering as early as possible. However, there is no guarantee on the time span between stop and the return from the invocation of render.