java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.tracing.RayProcessorBase
- All Implemented Interfaces:
RayProcessor
,Cloneable
- Direct Known Subclasses:
DefaultRayProcessor
,PathTracer
,PhotonMapRayProcessor
,Radiosity
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected PixelwiseRenderer
protected Tuple3d
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a clone of thisRayProcessor
.void
getColorFromRay
(Line ray, Spectrum resp, Color4f color, Random random) The main method of a ray processor.double
getIOR
(Intersection is, Spectrum spec) 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.protected void
protected void
void
void
setRecursionDepth
(int value) Methods inherited from class de.grogra.ray2.tracing.ProcessorBase
appendStatistics, appendStatisticsImpl, 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
-
Field Details
-
RECURSION_DEPTH
- See Also:
-
renderer
-
scene
-
sumColor
-
enteredSolids
-
-
Constructor Details
-
RayProcessorBase
public RayProcessorBase()
-
-
Method Details
-
setLightProcessor
-
getLightProcessor
-
setRecursionDepth
public void setRecursionDepth(int value) -
dup
Description copied from interface:RayProcessor
Returns a clone of thisRayProcessor
. All constant variables are copied shallowly, state variables are newly created and copied where necessary.- Specified by:
dup
in interfaceRayProcessor
- Parameters:
scene
- duplicate of scene- Returns:
- clone of this ray processor
-
mergeStatistics
- Overrides:
mergeStatistics
in classProcessorBase
-
initLocals
protected void initLocals()- Overrides:
initLocals
in classProcessorBase
-
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
- Parameters:
renderer
- the renderer which provides the needed informationscene
- the scene which is rendered
-
initializeBeforeTracing
Description copied from interface:RayProcessor
With this method the processor is initialized with the Randomizer actually before starting the ray tracing.- Specified by:
initializeBeforeTracing
in interfaceRayProcessor
- Parameters:
random
- pseudorandom generator
-
getIOR
-
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
- Parameters:
ray
- input - calculate for this rayresp
- responsivity of cameracolor
- output - the calculated colorrandom
- pseudorandom generator
-