de.grogra.ray2.radiosity
Class GroupListBuilder

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

public class GroupListBuilder
extends java.lang.Object

This Class creates a List of PatchGroups. Every object in the scene must be converted into patch groups.

Author:
Ralf Kopsch

Constructor Summary
GroupListBuilder()
           
 
Method Summary
 void add(Shader shader, Vector3d[] vertices)
          Converts a list of vertices into a patch group.
 void add(Shader shader, Vector3d[] vertices, Color3f emitted)
          Converts a list of vertices into a patch group.
 void add(Vector3d[] vertices, Color3f emitted, boolean visible)
          Converts a list of vertices into a patch group.
 java.util.Vector<PatchGroup> getGroups()
          Returns a list of patch groups.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupListBuilder

public GroupListBuilder()
Method Detail

add

public void add(Shader shader,
                Vector3d[] vertices)
Converts a list of vertices into a patch group. Sets the emitted color to black.

Parameters:
shader - a surface shader.
vertices - a list of vertices.

add

public void add(Shader shader,
                Vector3d[] vertices,
                Color3f emitted)
Converts a list of vertices into a patch group.

Parameters:
shader - a surface shader.
vertices - a list of vertices.
emitted - the emitted color.

add

public void add(Vector3d[] vertices,
                Color3f emitted,
                boolean visible)
Converts a list of vertices into a patch group.

Parameters:
vertices - a list of vertices.
emitted - the emitted color.
visible - if false, the patch group is not visible

getGroups

public java.util.Vector<PatchGroup> getGroups()
Returns a list of patch groups.

Returns:
Returns a list of patch groups.