de.grogra.ray2.radiosity
Class ZBuffer

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

public class ZBuffer
extends java.lang.Object

This class implements a Z-buffer for one side of the hemicube.

Author:
Ralf Kopsch

Constructor Summary
ZBuffer(boolean isTop)
          Creates a new z-buffer.
 
Method Summary
 void fillFormFactors(java.util.Map<SubPatch,FormFactor> formFactors, int side)
          Fills the given form factor map with form factors.
 ZPixel getZPixel(int x, int y)
          Returns a pixel from this buffer.
 void insert(SubPatch p, SubPatch originalPatch)
          Inserts a new patch into the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZBuffer

public ZBuffer(boolean isTop)
Creates a new z-buffer.

Parameters:
isTop - true, if this is the top side of a hemicube.
Method Detail

fillFormFactors

public void fillFormFactors(java.util.Map<SubPatch,FormFactor> formFactors,
                            int side)
Fills the given form factor map with form factors.

Parameters:
formFactors - the form factor array (in/out parameter)
side - the side of the cube.

getZPixel

public ZPixel getZPixel(int x,
                        int y)
Returns a pixel from this buffer.

Parameters:
x - the x-coordinate.
y - the y-coordinate.
Returns:
Returns a pixel from this buffer.

insert

public void insert(SubPatch p,
                   SubPatch originalPatch)
Inserts a new patch into the buffer.

Parameters:
p - a rotated patch
originalPatch - the unmodified patch