Module raytracer

Class NoAntialiasing

java.lang.Object
de.grogra.ray2.tracing.ProcessorBase
de.grogra.ray2.antialiasing.NoAntialiasing
All Implemented Interfaces:
Antialiasing, 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 Details

    • processor

      public RayProcessor processor
      The processor on which antialiasing operates.
  • Constructor Details

    • NoAntialiasing

      public NoAntialiasing()
  • Method Details

    • initLocals

      protected void initLocals()
      Overrides:
      initLocals 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
    • 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
    • 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 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
    • setPixelXY

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

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