de.grogra.ray2.tracing
public abstract class RayProcessorBase extends ProcessorBase implements RayProcessor
| Modifier and Type | Class and Description |
|---|---|
class |
RayProcessorBase.Locals |
| Modifier and Type | Field and Description |
|---|---|
EnteredSolidsList |
enteredSolids |
static java.lang.String |
RECURSION_DEPTH |
protected PixelwiseRenderer |
renderer |
Scene |
scene |
protected Tuple3d |
sumColor |
| Constructor and Description |
|---|
RayProcessorBase() |
| Modifier and Type | Method and Description |
|---|---|
RayProcessor |
dup(Scene scene)
Returns a clone of this
RayProcessor. |
void |
getColorFromRay(Line ray,
Spectrum resp,
Color4f color,
java.util.Random random)
The main method of a ray processor.
|
double |
getIOR(Intersection is,
Spectrum spec) |
LightProcessor |
getLightProcessor() |
void |
initialize(PixelwiseRenderer renderer,
Scene scene)
With this method the processor is initialized with the scene
and other information of a
PixelwiseRenderer. |
void |
initializeBeforeTracing(java.util.Random random)
With this method the processor is initialized with the Randomizer
actually before starting the ray tracing.
|
protected void |
initLocals() |
protected void |
mergeStatistics(ProcessorBase src) |
void |
setLightProcessor(LightProcessor proc) |
void |
setRecursionDepth(int value) |
appendStatistics, appendStatisticsImpl, cloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendStatisticspublic EnteredSolidsList enteredSolids
public static final java.lang.String RECURSION_DEPTH
protected PixelwiseRenderer renderer
public Scene scene
protected Tuple3d sumColor
public RayProcessor dup(Scene scene)
RayProcessorRayProcessor.
All constant variables are copied shallowly, state variables
are newly created and copied where necessary.dup in interface RayProcessorscene - duplicate of scenepublic void getColorFromRay(Line ray, Spectrum resp, Color4f color, java.util.Random random)
RayProcessorcolor for the specified ray.
color.w contains
the alpha value for the ray, the other components are
premultiplied with this alpha value.getColorFromRay in interface RayProcessorray - input - calculate for this rayresp - responsivity of cameracolor - output - the calculated colorrandom - pseudorandom generatorpublic double getIOR(Intersection is, Spectrum spec)
public LightProcessor getLightProcessor()
public void initialize(PixelwiseRenderer renderer, Scene scene)
RayProcessorPixelwiseRenderer.initialize in interface RayProcessorrenderer - the renderer which provides the needed informationscene - the scene which is renderedpublic void initializeBeforeTracing(java.util.Random random)
RayProcessorinitializeBeforeTracing in interface RayProcessorrandom - pseudorandom generatorprotected void initLocals()
initLocals in class ProcessorBaseprotected void mergeStatistics(ProcessorBase src)
mergeStatistics in class ProcessorBasepublic void setLightProcessor(LightProcessor proc)
public void setRecursionDepth(int value)