Package org.sunflow.core.photonmap
Class CausticPhotonMap
- java.lang.Object
-
- org.sunflow.core.photonmap.CausticPhotonMap
-
- All Implemented Interfaces:
CausticPhotonMapInterface,PhotonStore
public final class CausticPhotonMap extends java.lang.Object implements CausticPhotonMapInterface
-
-
Constructor Summary
Constructors Constructor Description CausticPhotonMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowDiffuseBounced()Allow photons reflected diffusely?booleanallowReflectionBounced()Allow specularly reflected photons?booleanallowRefractionBounced()Allow refracted photons?voidgetSamples(ShadingState state)Retrieve caustic photons at the specified shading location and add them as diffuse light samples.voidinit()Initialize the map after all photons have been stored.intnumEmit()Number of photons to emit from this surface.voidprepare(Options options, BoundingBox sceneBounds)Initialize this object for the specified scene size.voidstore(ShadingState state, Vector3 dir, Color power, Color diffuse)Store the specified photon.
-
-
-
Method Detail
-
prepare
public void prepare(Options options, BoundingBox sceneBounds)
Description copied from interface:PhotonStoreInitialize this object for the specified scene size.- Specified by:
preparein interfacePhotonStoresceneBounds- scene bounding box
-
store
public void store(ShadingState state, Vector3 dir, Color power, Color diffuse)
Description copied from interface:PhotonStoreStore the specified photon.- Specified by:
storein interfacePhotonStore- Parameters:
state- shading statedir- photon directionpower- photon powerdiffuse- diffuse color at the hit point
-
init
public void init()
Description copied from interface:PhotonStoreInitialize the map after all photons have been stored. This can be used to balance a kd-tree based photon map for example.- Specified by:
initin interfacePhotonStore
-
getSamples
public void getSamples(ShadingState state)
Description copied from interface:CausticPhotonMapInterfaceRetrieve caustic photons at the specified shading location and add them as diffuse light samples.- Specified by:
getSamplesin interfaceCausticPhotonMapInterface
-
allowDiffuseBounced
public boolean allowDiffuseBounced()
Description copied from interface:PhotonStoreAllow photons reflected diffusely?- Specified by:
allowDiffuseBouncedin interfacePhotonStore- Returns:
trueif diffuse bounces should be traced
-
allowReflectionBounced
public boolean allowReflectionBounced()
Description copied from interface:PhotonStoreAllow specularly reflected photons?- Specified by:
allowReflectionBouncedin interfacePhotonStore- Returns:
trueif specular reflection bounces should be traced
-
allowRefractionBounced
public boolean allowRefractionBounced()
Description copied from interface:PhotonStoreAllow refracted photons?- Specified by:
allowRefractionBouncedin interfacePhotonStore- Returns:
trueif refracted bounces should be traced
-
numEmit
public int numEmit()
Description copied from interface:PhotonStoreNumber of photons to emit from this surface.- Specified by:
numEmitin interfacePhotonStore- Returns:
- number of photons
-
-