Module raytracer

Class LightModelProcessor

java.lang.Object
de.grogra.ray2.tracing.RadiationModel
de.grogra.ray2.tracing.LightModelProcessor
All Implemented Interfaces:
Cloneable

public class LightModelProcessor extends RadiationModel implements Cloneable
Perform light model calculation for a single ray and collect the energy that was absorbed by the volumes. Color computations are performed with instances of Spectrum.
Author:
Reinhard Hemmerling
  • Constructor Details

    • LightModelProcessor

      public LightModelProcessor(Scene scene, int[] idToGroup)
      Create a new light model processor that uses the given spectrum factory.
      Parameters:
      scene -
    • LightModelProcessor

      public LightModelProcessor(Scene scene, ObjectList<Spectrum> radiantPowerSum, ObjectList<Spectrum> absorbedPowerSum, ObjectList<Spectrum> reflectedPowerSum, ObjectList<Spectrum> transmittedPowerSum, ObjectList<Spectrum> sensedIrridiancSum, int[] idToGroup, int bundleSize, ObjectList<ObjectList<RadiationModel.RayPoint>> rays, IntList hitCounterSum)
      Create a new light model processor that uses the given spectrum factory and adds collected radiation values to the lists.
      Parameters:
      scene - a scene
      radiantPowerSum -
      absorbedPowerSum -
      reflectedPowerSum -
      transmittedPowerSum -
      sensedIrradianceSum -
      rays - for debugging purposes, the traced rays will be added to the list. Use null if this is not needed
  • Method Details

    • initLocals

      protected void initLocals()
    • dup

      public LightModelProcessor dup(Scene scene)
    • compute

      public void compute(long rayCount, long seed, ProgressMonitor progress, int maxDepth, double minPower)
      Specified by:
      compute in class RadiationModel
    • getBundleSize

      public int getBundleSize()