de.grogra.ray2.antialiasing
Class NoAntialiasing

java.lang.Object
  extended by de.grogra.ray2.tracing.ProcessorBase
      extended by de.grogra.ray2.antialiasing.NoAntialiasing
All Implemented Interfaces:
Antialiasing, java.lang.Cloneable
Direct Known Subclasses:
MetropolisAntiAliasing, StochasticSupersampling

public class NoAntialiasing
extends ProcessorBase
implements Antialiasing

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
 RayProcessor processor
          The processor on which antialiasing operates.
 
Constructor Summary
NoAntialiasing()
           
 
Method Summary
protected  void appendStatisticsImpl(java.lang.StringBuffer stats)
           
 Antialiasing dup(Scene scene)
          Returns a clone of this Antialiasing.
 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 renderer, Scene scene)
          Initializes the antialiasing method using the data available through the renderer.
protected  void initLocals()
           
 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 Detail

processor

public RayProcessor processor
The processor on which antialiasing operates.

Constructor Detail

NoAntialiasing

public NoAntialiasing()
Method Detail

appendStatisticsImpl

protected void appendStatisticsImpl(java.lang.StringBuffer stats)
Specified by:
appendStatisticsImpl in class ProcessorBase

dup

public Antialiasing dup(Scene scene)
Description copied from interface: Antialiasing
Returns a clone of this Antialiasing. All constant variables are copied shallowly, state variables are newly created and copied where necessary.

Specified by:
dup in interface Antialiasing
Parameters:
scene - duplicate of scene
Returns:
clone of this antialiasing

getColorOfRectangle

public void getColorOfRectangle(double x,
                                double y,
                                double width,
                                double height,
                                Color4f color,
                                java.util.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 as uv coordinates for the Sensor which represents the camera.

Specified by:
getColorOfRectangle in interface Antialiasing
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 rectangle
height - height of the of the rectangle
color - The determined color of the rectangle will be stored in this parameter.
random - pseudorandom generator

initialize

public void initialize(PixelwiseRenderer renderer,
                       Scene scene)
Description copied from interface: Antialiasing
Initializes the antialiasing method using the data available through the renderer.

Specified by:
initialize in interface Antialiasing
Parameters:
renderer - the renderer which provides the needed information
scene - the scene which is rendered

initLocals

protected void initLocals()
Overrides:
initLocals in class ProcessorBase

setPixelXY

public void setPixelXY(float x,
                       float y)
Specified by:
setPixelXY in interface Antialiasing