- All Known Implementing Classes:
BiDirectionalProcessor
,DefaultRayProcessor
,LineTracer
,MetropolisProcessor
,PathTracer
,PhotonMapRayProcessor
,Radiosity
,RayProcessorBase
public interface RayProcessor
An implementation of this interface encapsulates the raytracing algorithm
for a single ray. Such an algorithm needs information about the whole scene,
this information is obtained through the
PixelwiseRenderer
which is passed
to the initialize
method.- Author:
- Michael Tauer, Ole Kniemeyer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendStatistics
(StringBuffer stats) Appends some statistics information about the ray processing tostats
.Returns a clone of thisRayProcessor
.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
.void
initializeBeforeTracing
(Random random) With this method the processor is initialized with the Randomizer actually before starting the ray tracing.
-
Method Details
-
dup
Returns a clone of thisRayProcessor
. All constant variables are copied shallowly, state variables are newly created and copied where necessary.- Parameters:
scene
- duplicate of scene- Returns:
- clone of this ray processor
-
initialize
With this method the processor is initialized with the scene and other information of aPixelwiseRenderer
.- Parameters:
renderer
- the renderer which provides the needed informationscene
- the scene which is rendered
-
initializeBeforeTracing
With this method the processor is initialized with the Randomizer actually before starting the ray tracing.- Parameters:
random
- pseudorandom generator
-
getColorFromRay
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.- Parameters:
ray
- input - calculate for this rayresp
- responsivity of cameracolor
- output - the calculated colorrandom
- pseudorandom generator
-
appendStatistics
Appends some statistics information about the ray processing tostats
. This method will be invoked after the whole rendering process has completed.- Parameters:
stats
- buffer for statistics information
-