de.grogra.ray2.tracing.modular
Class LineTracer
java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.tracing.RayProcessorBase
de.grogra.ray2.tracing.PathTracer
de.grogra.ray2.tracing.modular.LineTracer
- All Implemented Interfaces:
- RayProcessor, java.lang.Cloneable
public class LineTracer
- extends PathTracer
|
Method Summary |
int |
getAbbortCode()
|
PathValues |
getPathValues()
|
java.lang.String |
getTracingAbbortDescription()
|
void |
initialize(PixelwiseRenderer renderer,
Scene scene)
With this method the processor is initialized with the scene
and other information of a PixelwiseRenderer. |
java.lang.String |
printIList()
|
void |
set2LightPathTracing(boolean isLightRay)
Defines if this tracing is about light ray tracing or importance ray tracing |
void |
setCondition(ConditionObject cond)
|
void |
setMaxDepth(int maxDepth)
Defines the maximum depth of recursion, where maxDepth is the index of the last path vertex |
void |
setRandom(java.util.Random random)
|
void |
setSafeMemoryMode(MemoryHelper helper)
|
PathValues |
traceLine(int maxDepth,
PathValues pathValues,
Line startLine,
Spectrum initialWeight,
int sourceID,
boolean isLightRay,
java.util.Random random)
This function traces a Line(=ray) throug the scene starting at the first path vertex (index =0) |
void |
traceSubPath(PathValues srcPath,
int startVertex,
int newVertexCount,
boolean isLightRay,
Vector3d direction)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
abbortCode
public int abbortCode
condition
public ConditionObject condition
MAX_DEPTH_REACHED
public static final int MAX_DEPTH_REACHED
- See Also:
- Constant Field Values
NO_OBJECT_HIT
public static final int NO_OBJECT_HIT
- See Also:
- Constant Field Values
OUTGOING_RAY_TOO_WEAK
public static final int OUTGOING_RAY_TOO_WEAK
- See Also:
- Constant Field Values
RAY_WAS_ABSORBED
public static final int RAY_WAS_ABSORBED
- See Also:
- Constant Field Values
RAY_WAS_INFINITE
public static final int RAY_WAS_INFINITE
- See Also:
- Constant Field Values
RAY_WAS_STOPPED_ON_CONDITION
public static final int RAY_WAS_STOPPED_ON_CONDITION
- See Also:
- Constant Field Values
recursionCounter
public int recursionCounter
SPECULAR_CONDITION
public static final int SPECULAR_CONDITION
- See Also:
- Constant Field Values
STOP_CONDITION
public int STOP_CONDITION
traceSubPath
public boolean traceSubPath
LineTracer
public LineTracer(BiDirectionalProcessor processor)
getAbbortCode
public int getAbbortCode()
getPathValues
public PathValues getPathValues()
getTracingAbbortDescription
public java.lang.String getTracingAbbortDescription()
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 informationscene - the scene which is rendered
printIList
public java.lang.String printIList()
set2LightPathTracing
public void set2LightPathTracing(boolean isLightRay)
- Defines if this tracing is about light ray tracing or importance ray tracing
- Parameters:
isLightRay -
setCondition
public void setCondition(ConditionObject cond)
setMaxDepth
public void setMaxDepth(int maxDepth)
- Defines the maximum depth of recursion, where maxDepth is the index of the last path vertex
- Parameters:
maxDepth -
setRandom
public void setRandom(java.util.Random random)
setSafeMemoryMode
public void setSafeMemoryMode(MemoryHelper helper)
traceLine
public PathValues traceLine(int maxDepth,
PathValues pathValues,
Line startLine,
Spectrum initialWeight,
int sourceID,
boolean isLightRay,
java.util.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 storedstartLine - - the inital line, which has to be traced furtherinitialWeight - - the weight of the initial linesourceID - - the id of the line source (light or camera)isLightRay - - the boolean for checking, wether this is line is a light ray or importance rayrandom - - the randomizer
- Returns:
- the path result
traceSubPath
public void traceSubPath(PathValues srcPath,
int startVertex,
int newVertexCount,
boolean isLightRay,
Vector3d direction)