de.grogra.ray2.radiosity
Class ZPixel

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

public class ZPixel
extends java.lang.Object

This class represents one Pixel on the HemiCube.

Author:
Ralf Kopsch

Constructor Summary
ZPixel()
          Creates a new Hemicube pixel.
 
Method Summary
 void add(SubPatch patch, double z, boolean back)
          Adds a patch to this pixel.
 SubPatch getPatch()
          Returns the patch assigned to this pixel.
 boolean isBack()
          Returns true, if the back side of a patch is in front.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZPixel

public ZPixel()
Creates a new Hemicube pixel.

Method Detail

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 java.lang.String toString()
Overrides:
toString in class java.lang.Object