/* RCSid $Id: pmap.h,v 2.9 2018/01/24 19:39:05 rschregle Exp $ */ /* ====================================================================== Photon map main header 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: pmap.h,v 2.9 2018/01/24 19:39:05 rschregle Exp $ */ /* TODO: Combine type-specific properties of pmap types as binary flags, e.g. PMAP_TYPE_TRANSLIGHTFLOW = PMAP_TYPE_VOLUME | PMAP_TYPE_TRANSIENT | PMAP_TYPE_LIGHTFLOW ??? */ #ifndef PMAP_H #define PMAP_H #ifndef NIX #if defined(_WIN32) || defined(_WIN64) #define NIX 0 #else #define NIX 1 #endif #endif #include "pmapparm.h" #include "pmapdata.h" #include "pmutil.h" /* Macros to test for enabled photon map (also see pmapdata.h) */ #define photonMapping (\ globalPmap || preCompPmap || causticPmap || contribPmap || \ volumePhotonMapping || lightFlowPhotonMapping || \ transientPhotonMapping \ ) #define causticPhotonMapping (causticPmap) #define directPhotonMapping (directPmap || transientPhotonMapping) #define volumePhotonMapping (volumePmap) /* #define contribPhotonMapping (contribPmap && contribPmap -> srcContrib) */ #define contribPhotonMapping (contribPmap) #define transientPhotonMapping (transientPmap) #define lightFlowPhotonMapping (lightFlowPmap) extern void (*pmapLookup [])(PhotonMap*, RAY*, COLOR); /* Photon map lookup functions per type */ void distribPhotons (PhotonMap **pmaps, unsigned numProc); /* Emit photons from light sources and build photon maps for non-NULL * entries in photon map array */ void tracePhoton (RAY*); /* Follow photon as it bounces around the scene. Analogon to * raytrace(). */ void photonDensity (PhotonMap*, RAY*, COLOR irrad); /* Perform surface density estimate from incoming photon flux at ray's intersection point. Returns irradiance from found photons. */ void photonPreCompDensity (PhotonMap *pmap, RAY *r, COLOR irrad); /* Returns precomputed photon density estimate at ray -> rop. */ void volumePhotonDensity (PhotonMap*, RAY*, COLOR); /* Perform volume density estimate from incoming photon flux at ray's intersection point. Returns irradiance. */ #endif