Class Radiosity

  extended by de.grogra.ray2.tracing.ProcessorBase
      extended by de.grogra.ray2.tracing.RayProcessorBase
          extended by de.grogra.ray2.tracing.Radiosity
All Implemented Interfaces:
RayProcessor, java.lang.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.

Ralf Kopsch

Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.ray2.tracing.RayProcessorBase
Field Summary
Fields inherited from class de.grogra.ray2.tracing.RayProcessorBase
enteredSolids, RECURSION_DEPTH, renderer, scene
Constructor Summary
          Creates a new Radiosity Processor.
Method Summary
protected  void appendStatisticsImpl(java.lang.StringBuffer stats)
 void getColorFromRay(Line ray, Spectrum resp, Color4f color, java.util.Random random)
          The main method of a ray processor.
 void initialize(PixelwiseRenderer renderer, Scene scene)
          With this method the processor is initialized with the scene and other information of a PixelwiseRenderer.
Methods inherited from class de.grogra.ray2.tracing.RayProcessorBase
dup, getIOR, getLightProcessor, initializeBeforeTracing, initLocals, mergeStatistics, record, record, setLightProcessor, setRecursionDepth, unrecord
Methods inherited from class de.grogra.ray2.tracing.ProcessorBase
appendStatistics, clone
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.ray2.tracing.RayProcessor

Constructor Detail


public Radiosity()
Creates a new Radiosity Processor.

Method Detail


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


public void getColorFromRay(Line ray,
                            Spectrum resp,
                            Color4f color,
                            java.util.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
getColorFromRay in class RayProcessorBase
ray - input - calculate for this ray
resp - responsivity of camera
color - output - the calculated color
random - pseudorandom generator


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
initialize in class RayProcessorBase
renderer - the renderer which provides the needed information
scene - the scene which is rendered