Module raytracer

Class MetropolisAntiAliasing

All Implemented Interfaces:
Antialiasing, Cloneable

public class MetropolisAntiAliasing extends NoAntialiasing
  • Field Details

  • Constructor Details

    • MetropolisAntiAliasing

      public MetropolisAntiAliasing()
  • Method Details

    • 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
      Overrides:
      initialize in class NoAntialiasing
      Parameters:
      renderer - the renderer which provides the needed information
      scene - the scene which is rendered
    • 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
      Overrides:
      dup in class NoAntialiasing
      Parameters:
      scene - duplicate of scene
      Returns:
      clone of this antialiasing
    • resetAll

      public void resetAll()
    • setImageValues

      public void setImageValues(int width, int height)
    • initializeProccessorLoop

      public void initializeProccessorLoop(float brightness, int imageWidth, int imageHeight, int mutatedPixPerProc, MetropolisRenderer.MetropolisResult result, int procId)
    • getProcessorMutatedPixels

      public int getProcessorMutatedPixels()
    • signAntialiser2Processor

      public void signAntialiser2Processor()
    • stopProcessor

      public void stopProcessor()
    • getNewLensEdge

      public Line getNewLensEdge()
    • getPerturbedLensEdge

      public Line getPerturbedLensEdge(Line oldRay)
    • getStratifiedLensEdge

      public Line getStratifiedLensEdge()
    • getRayByCoordinates

      public Line getRayByCoordinates(double x, double y, double width, double height, Random random)
    • setPixelXY

      public void setPixelXY(float x, float y)
      Specified by:
      setPixelXY in interface Antialiasing
      Overrides:
      setPixelXY in class NoAntialiasing
    • registerUsedLensEdge

      public void registerUsedLensEdge(float x, float y)
    • pathChanged

      public void pathChanged()