de.grogra.ray2.tracing
Class MetropolisProcessor
java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.tracing.RayProcessorBase
de.grogra.ray2.tracing.PathTracer
de.grogra.ray2.tracing.BiDirectionalProcessor
de.grogra.ray2.tracing.MetropolisProcessor
- All Implemented Interfaces:
- RayProcessor, java.lang.Cloneable
public class MetropolisProcessor
- extends BiDirectionalProcessor
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CORRECTION_FACTOR
public static final java.lang.String CORRECTION_FACTOR
- See Also:
- Constant Field Values
imageHeight
public int imageHeight
imageUpdateRate
protected int imageUpdateRate
imageWidth
public int imageWidth
maximalPathLength
public int maximalPathLength
minimalPathLength
public int minimalPathLength
MUTATION_PP_COUNT
public static final java.lang.String MUTATION_PP_COUNT
- See Also:
- Constant Field Values
nextImageUpdateTime
protected long nextImageUpdateTime
stopped
public static boolean stopped
timeDiff
protected long timeDiff
MetropolisProcessor
public MetropolisProcessor()
appendStatisticsImpl
protected void appendStatisticsImpl(java.lang.StringBuffer stats)
- Overrides:
appendStatisticsImpl
in class BiDirectionalProcessor
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 BiDirectionalProcessor
- 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 BiDirectionalProcessor
- Parameters:
ray
- input - calculate for this rayresp
- responsivity of cameracolor
- output - the calculated colorrandom
- pseudorandom generator
getMutatedPixels
public int getMutatedPixels()
getResult
public PixelwiseRenderer.Result getResult()
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 BiDirectionalProcessor
- Parameters:
renderer
- the renderer which provides the needed informationscene
- the scene which is rendered
initializeLoop
public void initializeLoop(float brightness,
int imageWidth,
int imageHeight,
int mutatedPixPerProc,
MetropolisRenderer.MetropolisResult result,
int procId)
mergeWithRenderer
public void mergeWithRenderer()
pathChanged
public void pathChanged()
resetAll
public void resetAll()
setMinMaxPathLength
public void setMinMaxPathLength(int testLength)