de.grogra.ray2.tracing
Class RayProcessorBase
java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.tracing.RayProcessorBase
- All Implemented Interfaces:
- RayProcessor, java.lang.Cloneable
- Direct Known Subclasses:
- DefaultRayProcessor, PathTracer, PhotonMapRayProcessor, Radiosity
public abstract class RayProcessorBase
- extends ProcessorBase
- implements RayProcessor
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
enteredSolids
public java.util.ArrayList<Volume> enteredSolids
RECURSION_DEPTH
public static final java.lang.String RECURSION_DEPTH
- See Also:
- Constant Field Values
renderer
protected PixelwiseRenderer renderer
scene
public Scene scene
sumColor
protected Tuple3d sumColor
RayProcessorBase
public RayProcessorBase()
dup
public RayProcessor dup(Scene scene)
- Description copied from interface:
RayProcessor
- Returns a clone of this
RayProcessor
.
All constant variables are copied shallowly, state variables
are newly created and copied where necessary.
- Specified by:
dup
in interface RayProcessor
- Parameters:
scene
- duplicate of scene
- Returns:
- clone of this ray processor
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
- Parameters:
ray
- input - calculate for this rayresp
- responsivity of cameracolor
- output - the calculated colorrandom
- pseudorandom generator
getIOR
public double getIOR(Intersection is,
Spectrum spec)
getLightProcessor
public LightProcessor getLightProcessor()
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
- Parameters:
renderer
- the renderer which provides the needed informationscene
- the scene which is rendered
initializeBeforeTracing
public void initializeBeforeTracing(java.util.Random random)
- 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 interface RayProcessor
- Parameters:
random
- pseudorandom generator
initLocals
protected void initLocals()
- Overrides:
initLocals
in class ProcessorBase
mergeStatistics
protected void mergeStatistics(ProcessorBase src)
- Overrides:
mergeStatistics
in class ProcessorBase
record
public int record(Intersection is,
boolean reflected)
record
@Deprecated
public double record(Intersection is,
boolean push,
Spectrum spec)
- Deprecated.
setLightProcessor
public void setLightProcessor(LightProcessor proc)
setRecursionDepth
public void setRecursionDepth(int value)
unrecord
public void unrecord(Intersection is,
int index)