java.lang.Object
de.grogra.ray2.radiosity.ZBuffer
This class implements a Z-buffer for one side of the hemicube.
- Author:
- Ralf Kopsch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfillFormFactors(Map<SubPatch, FormFactor> formFactors, int side) Fills the given form factor map with form factors.getZPixel(int x, int y) Returns a pixel from this buffer.voidInserts a new patch into the buffer.
-
Constructor Details
-
ZBuffer
public ZBuffer(boolean isTop) Creates a new z-buffer.- Parameters:
isTop- true, if this is the top side of a hemicube.
-
-
Method Details
-
insert
Inserts a new patch into the buffer.- Parameters:
p- a rotated patchoriginalPatch- the unmodified patch
-
getZPixel
Returns a pixel from this buffer.- Parameters:
x- the x-coordinate.y- the y-coordinate.- Returns:
- Returns a pixel from this buffer.
-
fillFormFactors
Fills the given form factor map with form factors.- Parameters:
formFactors- the form factor array (in/out parameter)side- the side of the cube.
-