de.grogra.ray2.tracing
Class BiDirectionalProcessor

java.lang.Object
  extended by de.grogra.ray2.tracing.ProcessorBase
      extended by de.grogra.ray2.tracing.RayProcessorBase
          extended by de.grogra.ray2.tracing.PathTracer
              extended by de.grogra.ray2.tracing.BiDirectionalProcessor
All Implemented Interfaces:
RayProcessor, java.lang.Cloneable
Direct Known Subclasses:
MetropolisProcessor

public class BiDirectionalProcessor
extends PathTracer

Author:
Hagen Steidelm�ller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.grogra.ray2.tracing.RayProcessorBase
RayProcessorBase.Locals
 
Field Summary
 int bestLight
           
 int bestS
           
 int bestT
           
static java.lang.String EYEPATH_DEPTH
           
static java.lang.String HEURISTIC_FACTOR
           
 boolean isMetropolis
           
static java.lang.String LIGHTPATH_DEPTH
           
 LineTracer lineTracer
           
 CausticMap loacalCausticMap
           
 TracingMediator tracingMediator
           
 
Fields inherited from class de.grogra.ray2.tracing.PathTracer
BRIGHTNESS
 
Fields inherited from class de.grogra.ray2.tracing.RayProcessorBase
enteredSolids, RECURSION_DEPTH, renderer, scene
 
Constructor Summary
BiDirectionalProcessor()
           
 
Method Summary
protected  void appendStatisticsImpl(java.lang.StringBuffer stats)
           
 void chooseBestPathCombination(int s, int t, int lightId, Tuple3d combWeight)
           
 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.
 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.
 
Methods inherited from class de.grogra.ray2.tracing.PathTracer
initLocals, mergeStatistics
 
Methods inherited from class de.grogra.ray2.tracing.RayProcessorBase
getIOR, getLightProcessor, record, record, setLightProcessor, setRecursionDepth, unrecord
 
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
 

Field Detail

bestLight

public int bestLight

bestS

public int bestS

bestT

public int bestT

EYEPATH_DEPTH

public static final java.lang.String EYEPATH_DEPTH
See Also:
Constant Field Values

HEURISTIC_FACTOR

public static final java.lang.String HEURISTIC_FACTOR
See Also:
Constant Field Values

isMetropolis

public boolean isMetropolis

LIGHTPATH_DEPTH

public static final java.lang.String LIGHTPATH_DEPTH
See Also:
Constant Field Values

lineTracer

public LineTracer lineTracer

loacalCausticMap

public CausticMap loacalCausticMap

tracingMediator

public TracingMediator tracingMediator
Constructor Detail

BiDirectionalProcessor

public BiDirectionalProcessor()
Method Detail

appendStatisticsImpl

protected void appendStatisticsImpl(java.lang.StringBuffer stats)
Overrides:
appendStatisticsImpl in class PathTracer

chooseBestPathCombination

public void chooseBestPathCombination(int s,
                                      int t,
                                      int lightId,
                                      Tuple3d combWeight)

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
Overrides:
dup in class RayProcessorBase
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
Overrides:
getColorFromRay in class RayProcessorBase
Parameters:
ray - input - calculate for this ray
resp - responsivity of camera
color - output - the calculated color
random - pseudorandom generator

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
Overrides:
initialize in class PathTracer
Parameters:
renderer - the renderer which provides the needed information
scene - 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
Overrides:
initializeBeforeTracing in class RayProcessorBase
Parameters:
random - pseudorandom generator