Module raytracer

Class GroupListBuilder

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

public class GroupListBuilder extends Object
This Class creates a List of PatchGroups. Every object in the scene must be converted into patch groups.
Author:
Ralf Kopsch
  • Constructor Details

    • GroupListBuilder

      public GroupListBuilder()
  • Method Details

    • 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(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(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 Vector<PatchGroup> getGroups()
      Returns a list of patch groups.
      Returns:
      Returns a list of patch groups.