public class GridPhotonMap extends java.lang.Object implements GlobalPhotonMapInterface
| Constructor and Description |
|---|
GridPhotonMap() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowDiffuseBounced()
Allow photons reflected diffusely?
|
boolean |
allowReflectionBounced()
Allow specularly reflected photons?
|
boolean |
allowRefractionBounced()
Allow refracted photons?
|
Color |
getRadiance(Point3 p,
Vector3 n)
Lookup the global diffuse radiance at the specified surface point.
|
void |
init()
Initialize the map after all photons have been stored.
|
int |
numEmit()
Number of photons to emit from this surface.
|
void |
precomputeRadiance(boolean includeDirect,
boolean includeCaustics) |
void |
prepare(Options options,
BoundingBox sceneBounds)
Initialize this object for the specified scene size.
|
int |
size() |
void |
store(ShadingState state,
Vector3 dir,
Color power,
Color diffuse)
Store the specified photon.
|
public void prepare(Options options, BoundingBox sceneBounds)
PhotonStoreprepare in interface PhotonStoresceneBounds - scene bounding boxpublic int size()
public void store(ShadingState state, Vector3 dir, Color power, Color diffuse)
PhotonStorestore in interface PhotonStorestate - shading statedir - photon directionpower - photon powerdiffuse - diffuse color at the hit pointpublic void init()
PhotonStoreinit in interface PhotonStorepublic void precomputeRadiance(boolean includeDirect,
boolean includeCaustics)
public Color getRadiance(Point3 p, Vector3 n)
GlobalPhotonMapInterfacegetRadiance in interface GlobalPhotonMapInterfacep - surface positionn - surface normalpublic boolean allowDiffuseBounced()
PhotonStoreallowDiffuseBounced in interface PhotonStoretrue if diffuse bounces should be tracedpublic boolean allowReflectionBounced()
PhotonStoreallowReflectionBounced in interface PhotonStoretrue if specular reflection bounces should be
tracedpublic boolean allowRefractionBounced()
PhotonStoreallowRefractionBounced in interface PhotonStoretrue if refracted bounces should be tracedpublic int numEmit()
PhotonStorenumEmit in interface PhotonStore