de.grogra.ray2.antialiasing
public class StochasticSupersampling extends NoAntialiasing
| Modifier and Type | Field and Description |
|---|---|
static int |
CURRENT_I |
static int |
CURRENT_J |
static int |
DEBUG_I |
static int |
DEBUG_J |
static java.lang.String |
GRID_SIZE |
processor| Constructor and Description |
|---|
StochasticSupersampling() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendStatisticsImpl(java.lang.StringBuffer stats) |
void |
getColorOfRectangle(double x,
double y,
double width,
double height,
Color4f color,
java.util.Random random)
This method has to return a color value determined for a given
rectangular region on the image plane.
|
void |
initialize(PixelwiseRenderer tracer,
Scene scene)
Initializes the antialiasing method using the data available
through the
renderer. |
protected void |
initLocals() |
void |
setGridSize(int size)
Sets the grid size for supersampling.
|
dup, setPixelXYappendStatistics, clone, mergeStatisticsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendStatisticspublic static int CURRENT_I
public static int CURRENT_J
public static int DEBUG_I
public static int DEBUG_J
public static final java.lang.String GRID_SIZE
protected void appendStatisticsImpl(java.lang.StringBuffer stats)
appendStatisticsImpl in class NoAntialiasingpublic void getColorOfRectangle(double x,
double y,
double width,
double height,
Color4f color,
java.util.Random random)
Antialiasinguv coordinates for the
Sensor which represents the camera.getColorOfRectangle in interface AntialiasinggetColorOfRectangle in class NoAntialiasingx - Describes the x position of the lower left corner of
the rectangle.y - Describes the y position of the lower left corner of
the rectangle.width - width of the rectangleheight - height of the of the rectanglecolor - The determined color of the rectangle will be
stored in this parameter.random - pseudorandom generatorpublic void initialize(PixelwiseRenderer tracer, Scene scene)
Antialiasingrenderer.initialize in interface Antialiasinginitialize in class NoAntialiasingtracer - the renderer which provides the needed informationscene - the scene which is renderedprotected void initLocals()
initLocals in class NoAntialiasingpublic void setGridSize(int size)
size by size strata will be used
to generate the random rays.size - size of the grid edges