Module raytracer

Class PhotonMapping

java.lang.Object
de.grogra.ray.tracing.PhotonMapping
All Implemented Interfaces:
RayProcessor

public class PhotonMapping extends Object implements RayProcessor
Funktioniert momentan nur mit Punktlichtquellen und Arealight Funktioniert nicht mit directional Light
  • Constructor Details

    • PhotonMapping

      public PhotonMapping()
  • Method Details

    • createPhotonMap

      public void createPhotonMap()
    • hasFixedLightProcessor

      public boolean hasFixedLightProcessor()
      Specified by:
      hasFixedLightProcessor in interface RayProcessor
    • setLightProcessor

      public void setLightProcessor(LightProcessor model)
      Specified by:
      setLightProcessor in interface RayProcessor
    • getLightProcessor

      public LightProcessor getLightProcessor()
      Specified by:
      getLightProcessor in interface RayProcessor
    • setRecursionDepth

      public void setRecursionDepth(int value)
      Specified by:
      setRecursionDepth in interface RayProcessor
    • getRecursionDepth

      public int getRecursionDepth()
      Specified by:
      getRecursionDepth in interface RayProcessor
    • setPhotonCount

      public void setPhotonCount(int photonCount)
    • setRang

      public void setRang(int range)
    • clear

      public void clear()
    • prepareRayProcessor

      public void prepareRayProcessor(RTScene scene, IntersectionProcessor m_intersectionProcessor)
      Description copied from interface: RayProcessor
      With this method the processor is initialized with a 3d scene and an intersection processor it will use.
      Specified by:
      prepareRayProcessor in interface RayProcessor
    • getColorFromRay

      public void getColorFromRay(Ray ray, Color4f color4)
      Description copied from interface: RayProcessor
      The main methode of a ray processor. This methode has to calculate a color (or luminance of the red, gren and blue ) for each ray.
      Specified by:
      getColorFromRay in interface RayProcessor
      Parameters:
      ray - input - calculate for this ray
      color4 - output - the calculated color