Module raytracer

Class ZPixel

java.lang.Object
de.grogra.ray2.radiosity.ZPixel

public class ZPixel extends Object
This class represents one Pixel on the HemiCube.
Author:
Ralf Kopsch
  • Constructor Details

    • ZPixel

      public ZPixel()
      Creates a new Hemicube pixel.
  • Method Details

    • add

      public void add(SubPatch patch, double z, boolean back)
      Adds a patch to this pixel. If the pixel contains all ready a patch the 2 z values will be compared and the patch with the lesser value will be inserted.
      Parameters:
      patch -
      z -
      back -
    • getPatch

      public SubPatch getPatch()
      Returns the patch assigned to this pixel.
      Returns:
      Returns the patch assigned to this pixel.
    • isBack

      public boolean isBack()
      Returns true, if the back side of a patch is in front.
      Returns:
      Returns true, if the back side of a patch is in front.
    • toString

      public String toString()
      Overrides:
      toString in class Object