java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.antialiasing.NoAntialiasing
- All Implemented Interfaces:
Antialiasing
,Cloneable
- Direct Known Subclasses:
MetropolisAntiAliasing
,StochasticSupersampling
Although this class is implemented as antialiasing method it will not
perform any aliasing. Contrary it is used if no antialiasing is needed.
The method
getColorOfRectangle
will only return the color
of a single ray that is located at the center of the rectangle.- Author:
- Michael Tauer, Ole Kniemeyer
-
Field Summary
Modifier and TypeFieldDescriptionThe processor on which antialiasing operates. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendStatisticsImpl
(StringBuffer stats) Returns a clone of thisAntialiasing
.void
getColorOfRectangle
(double x, double y, double width, double height, Color4f color, Random random) This method has to return a color value determined for a given rectangular region on the image plane.void
initialize
(PixelwiseRenderer renderer, Scene scene) Initializes the antialiasing method using the data available through therenderer
.protected void
void
setPixelXY
(float x, float y) Methods inherited from class de.grogra.ray2.tracing.ProcessorBase
appendStatistics, clone, mergeStatistics
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.ray2.antialiasing.Antialiasing
appendStatistics
-
Field Details
-
processor
The processor on which antialiasing operates.
-
-
Constructor Details
-
NoAntialiasing
public NoAntialiasing()
-
-
Method Details
-
initLocals
protected void initLocals()- Overrides:
initLocals
in classProcessorBase
-
dup
Description copied from interface:Antialiasing
Returns a clone of thisAntialiasing
. All constant variables are copied shallowly, state variables are newly created and copied where necessary.- Specified by:
dup
in interfaceAntialiasing
- Parameters:
scene
- duplicate of scene- Returns:
- clone of this antialiasing
-
initialize
Description copied from interface:Antialiasing
Initializes the antialiasing method using the data available through therenderer
.- Specified by:
initialize
in interfaceAntialiasing
- Parameters:
renderer
- the renderer which provides the needed informationscene
- the scene which is rendered
-
getColorOfRectangle
public void getColorOfRectangle(double x, double y, double width, double height, Color4f color, Random random) Description copied from interface:Antialiasing
This method has to return a color value determined for a given rectangular region on the image plane. The coordinates are understood asuv
coordinates for theSensor
which represents the camera.- Specified by:
getColorOfRectangle
in interfaceAntialiasing
- Parameters:
x
- 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 generator
-
setPixelXY
public void setPixelXY(float x, float y) - Specified by:
setPixelXY
in interfaceAntialiasing
-
appendStatisticsImpl
- Specified by:
appendStatisticsImpl
in classProcessorBase
-