Package org.sunflow.core.gi
Class InstantGI.PointLightStore
- java.lang.Object
-
- org.sunflow.core.gi.InstantGI.PointLightStore
-
- All Implemented Interfaces:
PhotonStore
- Enclosing class:
- InstantGI
private class InstantGI.PointLightStore extends java.lang.Object implements PhotonStore
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<InstantGI.PointLight>
virtualLights
-
Constructor Summary
Constructors Modifier Constructor Description private
PointLightStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowDiffuseBounced()
Allow photons reflected diffusely?boolean
allowReflectionBounced()
Allow specularly reflected photons?boolean
allowRefractionBounced()
Allow refracted photons?void
init()
Initialize the map after all photons have been stored.int
numEmit()
Number of photons to emit from this surface.void
prepare(Options options, BoundingBox sceneBounds)
Initialize this object for the specified scene size.void
store(ShadingState state, Vector3 dir, Color power, Color diffuse)
Store the specified photon.
-
-
-
Field Detail
-
virtualLights
java.util.ArrayList<InstantGI.PointLight> virtualLights
-
-
Method Detail
-
numEmit
public int numEmit()
Description copied from interface:PhotonStore
Number of photons to emit from this surface.- Specified by:
numEmit
in interfacePhotonStore
- Returns:
- number of photons
-
prepare
public void prepare(Options options, BoundingBox sceneBounds)
Description copied from interface:PhotonStore
Initialize this object for the specified scene size.- Specified by:
prepare
in interfacePhotonStore
sceneBounds
- scene bounding box
-
store
public void store(ShadingState state, Vector3 dir, Color power, Color diffuse)
Description copied from interface:PhotonStore
Store the specified photon.- Specified by:
store
in interfacePhotonStore
- Parameters:
state
- shading statedir
- photon directionpower
- photon powerdiffuse
- diffuse color at the hit point
-
init
public void init()
Description copied from interface:PhotonStore
Initialize the map after all photons have been stored. This can be used to balance a kd-tree based photon map for example.- Specified by:
init
in interfacePhotonStore
-
allowDiffuseBounced
public boolean allowDiffuseBounced()
Description copied from interface:PhotonStore
Allow photons reflected diffusely?- Specified by:
allowDiffuseBounced
in interfacePhotonStore
- Returns:
true
if diffuse bounces should be traced
-
allowReflectionBounced
public boolean allowReflectionBounced()
Description copied from interface:PhotonStore
Allow specularly reflected photons?- Specified by:
allowReflectionBounced
in interfacePhotonStore
- Returns:
true
if specular reflection bounces should be traced
-
allowRefractionBounced
public boolean allowRefractionBounced()
Description copied from interface:PhotonStore
Allow refracted photons?- Specified by:
allowRefractionBounced
in interfacePhotonStore
- Returns:
true
if refracted bounces should be traced
-
-