de.grogra.ray2.tracing
Class Radiosity

java.lang.Object
  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.

Author:
Ralf Kopsch

Nested Class Summary
 
Nested classes/interfaces inherited from class de.grogra.ray2.tracing.RayProcessorBase
RayProcessorBase.Locals
 
Field Summary
 
Fields inherited from class de.grogra.ray2.tracing.RayProcessorBase
enteredSolids, RECURSION_DEPTH, renderer, scene
 
Constructor Summary
Radiosity()
          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
appendStatistics
 

Constructor Detail

Radiosity

public Radiosity()
Creates a new Radiosity Processor.

Method Detail

appendStatisticsImpl

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

getColorFromRay

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
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