Package org.sunflow.core
Interface PhotonStore
-
- All Known Subinterfaces:
CausticPhotonMapInterface,GlobalPhotonMapInterface
- All Known Implementing Classes:
CausticPhotonMap,GlobalPhotonMap,GridPhotonMap
public interface PhotonStoreDescribes an object which can store photons.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanallowDiffuseBounced()Allow photons reflected diffusely?booleanallowReflectionBounced()Allow specularly reflected photons?booleanallowRefractionBounced()Allow refracted photons?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
-
numEmit
int numEmit()
Number of photons to emit from this surface.- Returns:
- number of photons
-
prepare
void prepare(Options options, BoundingBox sceneBounds)
Initialize this object for the specified scene size.- Parameters:
sceneBounds- scene bounding box
-
store
void store(ShadingState state, Vector3 dir, Color power, Color diffuse)
Store the specified photon.- Parameters:
state- shading statedir- photon directionpower- photon powerdiffuse- diffuse color at the hit point
-
init
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.
-
allowDiffuseBounced
boolean allowDiffuseBounced()
Allow photons reflected diffusely?- Returns:
trueif diffuse bounces should be traced
-
allowReflectionBounced
boolean allowReflectionBounced()
Allow specularly reflected photons?- Returns:
trueif specular reflection bounces should be traced
-
allowRefractionBounced
boolean allowRefractionBounced()
Allow refracted photons?- Returns:
trueif refracted bounces should be traced
-
-