Module raytracer

Class LineTracer

All Implemented Interfaces:
RayProcessor, Cloneable

public class LineTracer extends PathTracer
  • Field Details

    • SPECULAR_CONDITION

      public static final int SPECULAR_CONDITION
      See Also:
    • STOP_CONDITION

      public int STOP_CONDITION
    • condition

      public ConditionObject condition
    • abbortCode

      public int abbortCode
    • MAX_DEPTH_REACHED

      public static final int MAX_DEPTH_REACHED
      See Also:
    • NO_OBJECT_HIT

      public static final int NO_OBJECT_HIT
      See Also:
    • OUTGOING_RAY_TOO_WEAK

      public static final int OUTGOING_RAY_TOO_WEAK
      See Also:
    • RAY_WAS_INFINITE

      public static final int RAY_WAS_INFINITE
      See Also:
    • RAY_WAS_ABSORBED

      public static final int RAY_WAS_ABSORBED
      See Also:
    • RAY_WAS_STOPPED_ON_CONDITION

      public static final int RAY_WAS_STOPPED_ON_CONDITION
      See Also:
    • traceSubPath

      public boolean traceSubPath
    • recursionCounter

      public int recursionCounter
  • Constructor Details

  • Method Details

    • 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
    • setRandom

      public void setRandom(Random random)
    • setMaxDepth

      public void setMaxDepth(int maxDepth)
      Defines the maximum depth of recursion, where maxDepth is the index of the last path vertex
      Parameters:
      maxDepth -
    • set2LightPathTracing

      public void set2LightPathTracing(boolean isLightRay)
      Defines if this tracing is about light ray tracing or importance ray tracing
      Parameters:
      isLightRay -
    • traceLine

      public PathValues traceLine(int maxDepth, PathValues pathValues, Line startLine, Spectrum initialWeight, int sourceID, boolean isLightRay, Random random)
      This function traces a Line(=ray) throug the scene starting at the first path vertex (index =0)
      Parameters:
      maxDepth - - the maximum path depth (=the index of the last path vertex)
      pathValues - - In this pathvalue-instance the results of the tracing will be stored
      startLine - - the inital line, which has to be traced further
      initialWeight - - the weight of the initial line
      sourceID - - the id of the line source (light or camera)
      isLightRay - - the boolean for checking, wether this is line is a light ray or importance ray
      random - - the randomizer
      Returns:
      the path result
    • getPathValues

      public PathValues getPathValues()
    • setCondition

      public void setCondition(ConditionObject cond)
    • traceSubPath

      public void traceSubPath(PathValues srcPath, int startVertex, int newVertexCount, boolean isLightRay, Vector3d direction)
    • setSafeMemoryMode

      public void setSafeMemoryMode(MemoryHelper helper)
    • getAbbortCode

      public int getAbbortCode()
    • getTracingAbbortDescription

      public String getTracingAbbortDescription()
    • printIList

      public String printIList()