org.sunflow.core.gi

## Class IrradianceCacheGIEngine

- java.lang.Object
- - org.sunflow.core.gi.IrradianceCacheGIEngine

All Implemented Interfaces:
  GIEngine

    public class IrradianceCacheGIEngine
    extends java.lang.Object
    implements GIEngine

### Constructor Summary

Constructors
Constructor and Description
`IrradianceCacheGIEngine()`

### Method Summary

Methods
`Color` `getGlobalRadiance(ShadingState state)` This is an optional method for engines that contain a secondary illumination engine which can return an approximation of the global radiance in the scene (like a photon map).
`Color` `getIrradiance(ShadingState state, Color diffuseReflectance)` Return the incomming irradiance due to indirect diffuse illumination at the specified surface point.
`boolean` `init(Options options, Scene scene)` Initialize the engine.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IrradianceCacheGIEngine

    public IrradianceCacheGIEngine()

### Method Detail

#### init

    public boolean init(Options options,
               Scene scene)

Description copied from interface: `GIEngine`
Initialize the engine. This is called before rendering begins.

Specified by:
  `init` in interface `GIEngine`
Returns:
  `true` if the init phase succeeded, `false` otherwise

#### getGlobalRadiance

    public Color getGlobalRadiance(ShadingState state)

Description copied from interface: `GIEngine`
This is an optional method for engines that contain a secondary illumination engine which can return an approximation of the global radiance in the scene (like a photon map). Engines can safely return `Color.BLACK` if they can't or don't wish to support this.

Specified by:
  `getGlobalRadiance` in interface `GIEngine`
Parameters:
  `state` - shading state
Returns:
  color approximating global radiance

#### getIrradiance

    public Color getIrradiance(ShadingState state,
                      Color diffuseReflectance)

Description copied from interface: `GIEngine`
Return the incomming irradiance due to indirect diffuse illumination at the specified surface point.

Specified by:
  `getIrradiance` in interface `GIEngine`
Parameters:
  `state` - current render state describing the point to be computed
  `diffuseReflectance` - diffuse albedo of the point being shaded, this can be used for importance tracking
Returns:
  irradiance from indirect diffuse illumination at the specified point