de.grogra.ray2.radiosity
Class RadiosityAlgorithm

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

public class RadiosityAlgorithm
extends java.lang.Object

This is the main radiosity calculation class.

Author:
Ralf Kopsch

Constructor Summary
RadiosityAlgorithm(PixelwiseRenderer renderer)
          Constructor.
 
Method Summary
 void calculateScene(java.util.Vector<PatchGroup> globalGroupList, float subDivThresh, int maxSubDivDepth, int threadCount)
          Calculates the scene.
 float getComponent(Tuple3f t, int pos)
          Returns the value with the index i.
 int getSteps()
          Returns the current calculation step.
 void setComponent(Tuple3f t, int pos, float newVal)
          Sets the value with the index i to a new Value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadiosityAlgorithm

public RadiosityAlgorithm(PixelwiseRenderer renderer)
Constructor.

Parameters:
renderer - the PixelwiseRenderer.
Method Detail

calculateScene

public void calculateScene(java.util.Vector<PatchGroup> globalGroupList,
                           float subDivThresh,
                           int maxSubDivDepth,
                           int threadCount)
Calculates the scene.

Parameters:
globalGroupList - the list of patch groups.
subDivThresh - the subdivision threshold.
maxSubDivDepth - the recursion depth.
threadCount - the thread count.

getComponent

public float getComponent(Tuple3f t,
                          int pos)
Returns the value with the index i.

Parameters:
pos - The index
Returns:
Returns the value with the index i.

getSteps

public int getSteps()
Returns the current calculation step.

Returns:
Returns the current calculation step.

setComponent

public void setComponent(Tuple3f t,
                         int pos,
                         float newVal)
Sets the value with the index i to a new Value.

Parameters:
pos - The index.
newVal - The new value to set.