Module raytracer

Class HemiCube

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

public final class HemiCube extends Object
This class creates a hemicube and calculates the delta form factors.
Author:
Ralf Kopsch
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
    Prints out the hemicube delta form factor for debugging.
    static void
    setWorldWide(float worldWide)
    Sets the hemicube size in world coordinates.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 side
      pixX - 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.