org.sunflow.core
Interface PhotonStore
- CausticPhotonMapInterface, GlobalPhotonMapInterface
- CausticPhotonMap, GlobalPhotonMap, GridPhotonMap
public interface PhotonStore
Describes an object which can store photons.
allowDiffuseBounced
public boolean allowDiffuseBounced()
Allow photons reflected diffusely?
true
if diffuse bounces should be traced
allowReflectionBounced
public boolean allowReflectionBounced()
Allow specularly reflected photons?
true
if specular reflection bounces should be
traced
allowRefractionBounced
public boolean allowRefractionBounced()
Allow refracted photons?
true
if refracted bounces should be traced
init
public void init()
Initialize the map after all photons have been stored. This can be used
to balance a kd-tree based photon map for example.
numEmit
public int numEmit()
Number of photons to emit from this surface.
prepare
public void prepare(BoundingBox sceneBounds)
Initialize this object for the specified scene size.
sceneBounds
- scene bounding box
store
public void store(ShadingState state,
Vector3 dir,
Color power,
Color diffuse)
Store the specified photon.
state
- shading statedir
- photon directionpower
- photon powerdiffuse
- diffuse color at the hit point