java.lang.Object
de.grogra.ray2.radiosity.HemiCube
This class creates a hemicube and calculates the delta form factors.
- Author:
- Ralf Kopsch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
getFormFactor
(int side, int pixX, int pixY) Returns the form factor for one hemicube pixel.static int
Return the number of hemicube pixels.static float
Returns the hemicube size in world coordinates.static void
init
(int cubeWidth) Initializes the hemicube with the given cube width.static void
print()
Prints out the hemicube delta form factor for debugging.static void
setWorldWide
(float worldWide) Sets the hemicube size in world coordinates.
-
Constructor Details
-
HemiCube
public HemiCube()
-
-
Method Details
-
init
public static void init(int cubeWidth) Initializes the hemicube with the given cube width.- Parameters:
cubeWidth
- the cube width.
-
getFormFactor
public static float getFormFactor(int side, int pixX, int pixY) Returns the form factor for one hemicube pixel.- Parameters:
side
- the cube sidepixX
- the x-coordinate.pixY
- the y-coordinate.- Returns:
- Returns the form factor for one hemicube pixel.
-
getWorldWide
public static float getWorldWide()Returns the hemicube size in world coordinates.- Returns:
- Returns the hemicube size in world coordinates.
-
setWorldWide
public static void setWorldWide(float worldWide) Sets the hemicube size in world coordinates.- Parameters:
worldWide
- the hemicube size to set.
-
getPixelsWide
public static int getPixelsWide()Return the number of hemicube pixels.- Returns:
- Return the number of hemicube pixels.
-
print
public static void print()Prints out the hemicube delta form factor for debugging.
-