de.grogra.ray2.tracing
public class PixelwiseRenderer extends Task implements Renderer
| Modifier and Type | Class and Description |
|---|---|
static class |
PixelwiseRenderer.RenderTask |
static class |
PixelwiseRenderer.Result |
| Modifier and Type | Field and Description |
|---|---|
protected Antialiasing |
antialiasing |
static java.lang.String |
ANTIALIASING |
static java.lang.String |
AUTO_ADJUST |
static java.lang.String |
AUTO_ADJUST_MAX_VALUE |
protected boolean |
autoAdjust |
protected float |
autoAdjustMaxValue |
protected float |
brightness |
static java.lang.String |
BRIGHTNESS |
protected Sensor |
camera |
protected Matrix4d |
cameraTransformation |
static float |
DEBUG_LINE |
static boolean |
DEBUG_PIXEL |
static boolean |
DEBUG_SUBPIXEL |
static int |
DEBUG_X |
static int |
DEBUG_Y |
protected boolean |
hdr |
static java.lang.String |
HDR |
protected float[][] |
hdrPixels |
protected int |
height |
protected java.awt.image.BufferedImage |
image |
protected int |
imageUpdateDistance |
protected int |
imageUpdateRate |
protected int[] |
lineState |
protected float |
maxValue |
protected ProgressMonitor |
monitor |
protected java.awt.image.ImageObserver |
observer |
protected Scene |
originalScene |
static java.lang.String |
RAYPROCESSOR |
static java.lang.String |
REMOVE_OUTLIERS |
protected boolean |
removeOutliers |
protected int |
renderedLines |
protected int[] |
rgbaPixels |
protected long |
seed |
static java.lang.String |
SEED |
static java.lang.String |
THREAD_COUNT |
int |
threadCount |
protected int |
width |
| Constructor and Description |
|---|
PixelwiseRenderer() |
| Modifier and Type | Method and Description |
|---|---|
Solver |
createLocalSolver(boolean sameThread) |
protected void |
dispose(PartialTask task)
This method is invoked when an active solver is removed or
invokes
Task.partialTaskDone(Solver) in order to tell this
task that the partial task of the solver is no longer processed. |
protected boolean |
done()
Returns
true iff the complete task has been solved. |
float |
getAdjustFactor() |
boolean |
getAutoAdjust() |
boolean |
getBooleanOption(java.lang.String key,
boolean def) |
float |
getBrightness() |
Sensor |
getCamera() |
Matrix4d |
getCameraTransformation() |
java.lang.Object |
getClassOption(java.lang.String key,
java.lang.Object def) |
java.lang.Number |
getNumericOption(java.lang.String key,
java.lang.Number def) |
Scene |
getScene() |
long |
getSeed() |
void |
initialize(Options opts,
ProgressMonitor progress)
Initializes the renderer.
|
float |
luminance(double x,
double y,
double z) |
void |
merge(PixelwiseRenderer.Result res) |
protected PartialTask |
nextPartialTask(int solverIndex)
This method returns the next partial task for this task.
|
protected void |
removeOutliers() |
void |
render(Scene scene,
Sensor camera,
Matrix4d cameraTransformation,
int width,
int height,
java.awt.image.ImageObserver obs)
Renders an image of a
scene. |
protected void |
renderLines(Antialiasing antialiasing,
IntList lines,
PixelwiseRenderer.Result res) |
void |
setAntialiasing(Antialiasing a) |
void |
setAutoAdjust(boolean value) |
void |
setAutoAdjustMaxValue(float value) |
void |
setBrightness(float value) |
void |
setHDR(boolean value) |
void |
setMessage(java.lang.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) |
addSolver, finishSolve, getSolverCount, getSolvers, isSolving, isStopped, partialTaskDone, prepareSolve, removeSolver, removeSolvers, solve, stopprotected Antialiasing antialiasing
public static final java.lang.String ANTIALIASING
public static final java.lang.String AUTO_ADJUST
public static final java.lang.String AUTO_ADJUST_MAX_VALUE
protected boolean autoAdjust
protected float autoAdjustMaxValue
protected float brightness
public static final java.lang.String BRIGHTNESS
protected Sensor camera
protected Matrix4d cameraTransformation
public static float DEBUG_LINE
public static boolean DEBUG_PIXEL
public static boolean DEBUG_SUBPIXEL
public static int DEBUG_X
public static int DEBUG_Y
protected boolean hdr
public static final java.lang.String HDR
protected float[][] hdrPixels
protected int height
protected java.awt.image.BufferedImage image
protected int imageUpdateDistance
protected int imageUpdateRate
protected int[] lineState
protected float maxValue
protected ProgressMonitor monitor
protected java.awt.image.ImageObserver observer
protected Scene originalScene
public static final java.lang.String RAYPROCESSOR
public static final java.lang.String REMOVE_OUTLIERS
protected boolean removeOutliers
protected int renderedLines
protected int[] rgbaPixels
protected long seed
public static final java.lang.String SEED
public static final java.lang.String THREAD_COUNT
public int threadCount
protected int width
public Solver createLocalSolver(boolean sameThread)
protected void dispose(PartialTask task)
TaskTask.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.protected boolean done()
Tasktrue iff the complete task has been solved.public float getAdjustFactor()
public boolean getAutoAdjust()
public boolean getBooleanOption(java.lang.String key,
boolean def)
public float getBrightness()
public Sensor getCamera()
public Matrix4d getCameraTransformation()
public java.lang.Object getClassOption(java.lang.String key,
java.lang.Object def)
public java.lang.Number getNumericOption(java.lang.String key,
java.lang.Number def)
public Scene getScene()
public long getSeed()
public void initialize(Options opts, ProgressMonitor progress)
Rendererinitialize in interface Rendereropts - options to use (may be null)progress - monitor to display rendering progress
(may be null)public float luminance(double x,
double y,
double z)
public void merge(PixelwiseRenderer.Result res)
protected PartialTask nextPartialTask(int solverIndex)
Tasknull is returned. However, a later invocation
may return a partial task if a currently active solver
does not completely solve its partial task.nextPartialTask in class TasksolverIndex - index of solver which will be used for next tasknullprotected void removeOutliers()
public void render(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, java.awt.image.ImageObserver obs)
Rendererscene.protected void renderLines(Antialiasing antialiasing, IntList lines, PixelwiseRenderer.Result res)
public void setAntialiasing(Antialiasing a)
public void setAutoAdjust(boolean value)
public void setAutoAdjustMaxValue(float value)
public void setBrightness(float value)
public void setHDR(boolean value)
public void setMessage(java.lang.String text,
float progress)
text - short text to displayprogress - state of progress from 0 to 1, or one of the
constants #INDETERMINATE_PROGRESS, #DONE_PROGRESSpublic void setThreadCount(int value)
protected static int toIntColor(float r,
float g,
float b,
float a)
protected static float[] toRGBA(int intColor)