java.lang.Object
de.grogra.task.Task
de.grogra.ray2.tracing.PixelwiseRenderer
- All Implemented Interfaces:
Renderer
- Direct Known Subclasses:
BidirectionalRenderer,MetropolisRenderer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Antialiasingstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected floatprotected floatstatic final Stringprotected Sensorprotected Matrix4dstatic floatstatic booleanstatic booleanstatic intstatic intprotected booleanstatic final Stringprotected float[][]protected intprotected BufferedImageprotected intprotected intprotected int[]protected floatprotected ProgressMonitorprotected ImageObserverprotected Scenestatic final Stringstatic final Stringprotected booleanprotected intprotected int[]protected longstatic final Stringstatic final Stringintprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLocalSolver(boolean sameThread) protected voiddispose(PartialTask task) This method is invoked when an active solver is removed or invokesTask.partialTaskDone(Solver)in order to tell this task that the partial task of the solver is no longer processed.protected booleandone()Returnstrueiff the complete task has been solved.floatbooleanbooleangetBooleanOption(String key, boolean def) floatgetClassOption(String key, Object def) getNumericOption(String key, Number def) getScene()longgetSeed()voidinitialize(Options opts, ProgressMonitor progress) Initializes the renderer.floatluminance(double x, double y, double z) voidprotected PartialTasknextPartialTask(int solverIndex) This method returns the next partial task for this task.protected voidvoidrender(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs) Renders an image of ascene.protected voidrenderLines(Antialiasing antialiasing, IntList lines, PixelwiseRenderer.Result res) voidvoidsetAutoAdjust(boolean value) voidsetAutoAdjustMaxValue(float value) voidsetBrightness(float value) voidsetHDR(boolean value) voidsetMessage(String text, float progress) Show Status message.voidsetThreadCount(int value) protected static inttoIntColor(float r, float g, float b, float a) protected static float[]toRGBA(int intColor) Methods inherited from class de.grogra.task.Task
addSolver, finishSolve, getSolverCount, getSolvers, isSolving, isStopped, partialTaskDone, prepareSolve, removeSolver, removeSolvers, solve, stop
-
Field Details
-
ANTIALIASING
- See Also:
-
RAYPROCESSOR
- See Also:
-
BRIGHTNESS
- See Also:
-
THREAD_COUNT
- See Also:
-
AUTO_ADJUST
- See Also:
-
AUTO_ADJUST_MAX_VALUE
- See Also:
-
REMOVE_OUTLIERS
- See Also:
-
HDR
- See Also:
-
SEED
- See Also:
-
monitor
-
camera
-
cameraTransformation
-
threadCount
public int threadCount -
width
protected int width -
height
protected int height -
image
-
rgbaPixels
protected int[] rgbaPixels -
hdrPixels
protected float[][] hdrPixels -
observer
-
originalScene
-
antialiasing
-
imageUpdateDistance
protected int imageUpdateDistance -
imageUpdateRate
protected int imageUpdateRate -
brightness
protected float brightness -
hdr
protected boolean hdr -
autoAdjust
protected boolean autoAdjust -
removeOutliers
protected boolean removeOutliers -
autoAdjustMaxValue
protected float autoAdjustMaxValue -
maxValue
protected float maxValue -
seed
protected long seed -
renderedLines
protected int renderedLines -
lineState
protected int[] lineState -
DEBUG_X
public static int DEBUG_X -
DEBUG_Y
public static int DEBUG_Y -
DEBUG_LINE
public static float DEBUG_LINE -
DEBUG_PIXEL
public static boolean DEBUG_PIXEL -
DEBUG_SUBPIXEL
public static boolean DEBUG_SUBPIXEL
-
-
Constructor Details
-
PixelwiseRenderer
public PixelwiseRenderer()
-
-
Method Details
-
getNumericOption
-
getBooleanOption
-
getClassOption
-
initialize
Description copied from interface:RendererInitializes the renderer. This method has to be invoked at first.- Specified by:
initializein interfaceRenderer- Parameters:
opts- options to use (may benull)progress- monitor to display rendering progress (may benull)
-
getCamera
-
getCameraTransformation
-
setAntialiasing
-
setHDR
public void setHDR(boolean value) -
setAutoAdjust
public void setAutoAdjust(boolean value) -
getAutoAdjust
public boolean getAutoAdjust() -
setAutoAdjustMaxValue
public void setAutoAdjustMaxValue(float value) -
setBrightness
public void setBrightness(float value) -
setThreadCount
public void setThreadCount(int value) -
getBrightness
public float getBrightness() -
getSeed
public long getSeed() -
render
public void render(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs) Description copied from interface:RendererRenders an image of ascene. -
removeOutliers
protected void removeOutliers() -
getAdjustFactor
public float getAdjustFactor() -
createLocalSolver
-
merge
-
done
protected boolean done()Description copied from class:TaskReturnstrueiff the complete task has been solved. -
nextPartialTask
Description copied from class:TaskThis method returns the next partial task for this task. If all parts of the task have been solved or currently are being solved,nullis returned. However, a later invocation may return a partial task if a currently active solver does not completely solve its partial task.- Specified by:
nextPartialTaskin classTask- Parameters:
solverIndex- index of solver which will be used for next task- Returns:
- next partial task, or
null
-
dispose
Description copied from class:TaskThis method is invoked when an active solver is removed or invokesTask.partialTaskDone(Solver)in order to tell this task that the partial task of the solver is no longer processed. Note that the solver may not have completely processed its partial task. -
renderLines
-
toIntColor
protected static int toIntColor(float r, float g, float b, float a) -
toRGBA
protected static float[] toRGBA(int intColor) -
setMessage
Show Status message.- Parameters:
text- short text to displayprogress- state of progress from 0 to 1, or one of the constants,invalid reference
#INDETERMINATE_PROGRESSinvalid reference
#DONE_PROGRESS
-
getScene
-
luminance
public float luminance(double x, double y, double z)
-