java.lang.Object
de.grogra.task.Task
de.grogra.ray2.tracing.PixelwiseRenderer
- All Implemented Interfaces:
Renderer
- Direct Known Subclasses:
BidirectionalRenderer
,MetropolisRenderer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected Antialiasing
static final String
static final String
static final String
protected boolean
protected float
protected float
static final String
protected Sensor
protected Matrix4d
static float
static boolean
static boolean
static int
static int
protected boolean
static final String
protected float[][]
protected int
protected BufferedImage
protected int
protected int
protected int[]
protected float
protected ProgressMonitor
protected ImageObserver
protected Scene
static final String
static final String
protected boolean
protected int
protected int[]
protected long
static final String
static final String
int
protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateLocalSolver
(boolean sameThread) protected void
dispose
(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 boolean
done()
Returnstrue
iff the complete task has been solved.float
boolean
boolean
getBooleanOption
(String key, boolean def) float
getClassOption
(String key, Object def) getNumericOption
(String key, Number def) getScene()
long
getSeed()
void
initialize
(Options opts, ProgressMonitor progress) Initializes the renderer.float
luminance
(double x, double y, double z) void
protected PartialTask
nextPartialTask
(int solverIndex) This method returns the next partial task for this task.protected void
void
render
(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, ImageObserver obs) Renders an image of ascene
.protected void
renderLines
(Antialiasing antialiasing, IntList lines, PixelwiseRenderer.Result res) void
void
setAutoAdjust
(boolean value) void
setAutoAdjustMaxValue
(float value) void
setBrightness
(float value) void
setHDR
(boolean value) void
setMessage
(String text, float progress) Show Status message.void
setThreadCount
(int value) protected static int
toIntColor
(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:Renderer
Initializes the renderer. This method has to be invoked at first.- Specified by:
initialize
in 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:Renderer
Renders an image of ascene
. -
removeOutliers
protected void removeOutliers() -
getAdjustFactor
public float getAdjustFactor() -
createLocalSolver
-
merge
-
done
protected boolean done()Description copied from class:Task
Returnstrue
iff the complete task has been solved. -
nextPartialTask
Description copied from class:Task
This method returns the next partial task for this task. If all parts of the task have been solved or currently are being solved,null
is returned. However, a later invocation may return a partial task if a currently active solver does not completely solve its partial task.- Specified by:
nextPartialTask
in classTask
- Parameters:
solverIndex
- index of solver which will be used for next task- Returns:
- next partial task, or
null
-
dispose
Description copied from class: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. 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#INDETERMINATE_PROGRESS
,#DONE_PROGRESS
-
getScene
-
luminance
public float luminance(double x, double y, double z)
-