Module raytracer

Class BiDirectionalProcessor

All Implemented Interfaces:
RayProcessor, Cloneable
Direct Known Subclasses:
MetropolisProcessor

public class BiDirectionalProcessor extends PathTracer
Author:
Hagen Steidelmüller
  • Field Details

  • Constructor Details

    • BiDirectionalProcessor

      public BiDirectionalProcessor()
  • Method Details

    • 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
    • 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(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
    • getColorFromRay

      public void getColorFromRay(Line ray, Spectrum resp, Color4f color, 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
    • chooseBestPathCombination

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

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