/* RCSid $Id$ */ /* ====================================================================== Photon map density estimation routines Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) (c) Fraunhofer Institute for Solar Energy Systems, supported by the German Research Foundation (DFG LU-204/10-2, "Fassadenintegrierte Regelsysteme" (FARESYS)) (c) Lucerne University of Applied Sciences and Arts, supported by the Swiss National Science Foundation (SNSF #147053, "Daylight Redirecting Components") (c) Tokyo University of Science, supported by the JSPS Grants-in-Aid for Scientific Research (KAKENHI JP19KK0115, "Three-Dimensional Light Flow") ====================================================================== $Id$ */ #ifndef PMAPDENS_H #define PMAPDENS_H #include "pmap.h" /* Photon map lookup functions per type */ void (*pmapLookup [NUM_PMAP_TYPES])(PhotonMap*, RAY*, COLOR); void photonDensity (PhotonMap *pmap, RAY *ray, COLOR irrad); /* Surface-bound photon density estimate for global and caustic photons. Returns irradiance at ray -> rop. */ void photonPreCompDensity (PhotonMap *pmap, RAY *r, COLOR irrad); /* Surface-bound photon density estimate for (single) precomputed photon. Returns precomputed irradiance at ray -> rop. */ void volumePhotonDensity (PhotonMap *pmap, RAY *ray, COLOR irrad); /* Volume photon density estimate using Henyey-Greenstein phase function. Returns inscattered irradiance at ray -> rop. */ #ifdef PMAP_PHOTONFLOW /* Routines to evaluate the irradiance of a physical light field represented by "photon flow" using volume photons, ignoring the participating medium in which they are deposited. */ void lightFlowDensity (PhotonMap *pmap, RAY *ray, COLOR irrad); /* Evaluate (static) irradiance from volume photons incident on plane defined by normal ray -> ron at point ray -> rop, ignoring participating medium. This evaluation interprets the volume photon map as a representation of the "flow" of light, i.e. a physical light field. If sphericalIrrad == 0, the planar irradiance is evaluated with respect to the plane defined by the ray normal ray -> ron. If sphericalIrrad == 1, the mean spherical irradiance is evaluated, and the normal ray -> ron is ignored. */ void transLightFlowDensity (PhotonMap *pmap, RAY *ray, COLOR irrad); /* Evaluate transient irradiance from volume photons incident on plane defined by normal ray -> ron at point ray->rop and time pmap->time, ignoring participating medium. Additionally, the speed of light (c) in units of the scene geometry is obtained from pmap->velocity, and the time is transformed in units of cumulative path length for consistency with the lookup point. Physically, this corresponds to finding the photons that would pass through the lookup point at the given time. If sphericalIrrad == 0, the planar irradiance is evaluated with respect to the plane defined by the ray normal ray->ron. If sphericalIrrad == 1, the mean spherical irradiance is evaluated, and the normal ray->ron is ignored. */ #endif #endif