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
FieldsModifier and TypeFieldDescriptionThe processor on which antialiasing operates. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendStatisticsImpl(StringBuffer stats) Returns a clone of thisAntialiasing.voidgetColorOfRectangle(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.voidinitialize(PixelwiseRenderer renderer, Scene scene) Initializes the antialiasing method using the data available through therenderer.protected voidvoidsetPixelXY(float x, float y) Methods inherited from class de.grogra.ray2.tracing.ProcessorBase
appendStatistics, clone, mergeStatisticsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
initLocalsin classProcessorBase
-
dup
Description copied from interface:AntialiasingReturns a clone of thisAntialiasing. All constant variables are copied shallowly, state variables are newly created and copied where necessary.- Specified by:
dupin interfaceAntialiasing- Parameters:
scene- duplicate of scene- Returns:
- clone of this antialiasing
-
initialize
Description copied from interface:AntialiasingInitializes the antialiasing method using the data available through therenderer.- Specified by:
initializein 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:AntialiasingThis method has to return a color value determined for a given rectangular region on the image plane. The coordinates are understood asuvcoordinates for theSensorwhich represents the camera.- Specified by:
getColorOfRectanglein 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:
setPixelXYin interfaceAntialiasing
-
appendStatisticsImpl
- Specified by:
appendStatisticsImplin classProcessorBase
-