Module raytracer

Class Radiosity

All Implemented Interfaces:
RayProcessor, Cloneable

public class Radiosity extends RayProcessorBase
This is a Radiosity Processor. It divides the scene into triangle patches and calculates the radiosity color for each.
Author:
Ralf Kopsch
  • Constructor Details

    • Radiosity

      public Radiosity()
      Creates a new Radiosity Processor.
  • Method Details

    • getColorFromRay

      public void getColorFromRay(Line ray, Spectrum resp, Color4f color, Random random)
      Description copied from interface: RayProcessor
      The main method of a ray processor. This method computes a color for the specified ray. color.w contains the alpha value for the ray, the other components are premultiplied with this alpha value.
      Specified by:
      getColorFromRay in interface RayProcessor
      Overrides:
      getColorFromRay in class RayProcessorBase
      Parameters:
      ray - input - calculate for this ray
      resp - responsivity of camera
      color - output - the calculated color
      random - pseudorandom generator
    • initialize

      public void initialize(PixelwiseRenderer renderer, Scene scene)
      Description copied from interface: RayProcessor
      With this method the processor is initialized with the scene and other information of a PixelwiseRenderer.
      Specified by:
      initialize in interface RayProcessor
      Overrides:
      initialize in class RayProcessorBase
      Parameters:
      renderer - the renderer which provides the needed information
      scene - the scene which is rendered
    • appendStatisticsImpl

      protected void appendStatisticsImpl(StringBuffer stats)
      Specified by:
      appendStatisticsImpl in class ProcessorBase