java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.tracing.RayProcessorBase
de.grogra.ray2.tracing.Radiosity
- All Implemented Interfaces:
RayProcessor
,Cloneable
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendStatisticsImpl
(StringBuffer stats) void
getColorFromRay
(Line ray, Spectrum resp, Color4f color, 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 aPixelwiseRenderer
.Methods inherited from class de.grogra.ray2.tracing.RayProcessorBase
dup, getIOR, getLightProcessor, initializeBeforeTracing, initLocals, mergeStatistics, setLightProcessor, setRecursionDepth
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 Details
-
Radiosity
public Radiosity()Creates a new Radiosity Processor.
-
-
Method Details
-
getColorFromRay
Description copied from interface:RayProcessor
The main method of a ray processor. This method computes acolor
for the specifiedray
.color.w
contains the alpha value for the ray, the other components are premultiplied with this alpha value.- Specified by:
getColorFromRay
in interfaceRayProcessor
- Overrides:
getColorFromRay
in classRayProcessorBase
- Parameters:
ray
- input - calculate for this rayresp
- responsivity of cameracolor
- output - the calculated colorrandom
- pseudorandom generator
-
initialize
Description copied from interface:RayProcessor
With this method the processor is initialized with the scene and other information of aPixelwiseRenderer
.- Specified by:
initialize
in interfaceRayProcessor
- Overrides:
initialize
in classRayProcessorBase
- Parameters:
renderer
- the renderer which provides the needed informationscene
- the scene which is rendered
-
appendStatisticsImpl
- Specified by:
appendStatisticsImpl
in classProcessorBase
-