--- ray/src/rt/pmapsrc.h 2015/02/24 19:39:27 2.1 +++ ray/src/rt/pmapsrc.h 2024/09/17 16:36:05 2.8 @@ -1,13 +1,20 @@ +/* RCSid $Id: pmapsrc.h,v 2.8 2024/09/17 16:36:05 greg Exp $ */ + /* - ================================================================== + ====================================================================== Photon map support routines for emission from light sources Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) (c) Fraunhofer Institute for Solar Energy Systems, - Lucerne University of Applied Sciences & Arts - ================================================================== + supported by the German Research Foundation (DFG) + under the FARESYS project. + (c) Lucerne University of Applied Sciences and Arts, + supported by the Swiss National Science Foundation (SNSF #147053). + (c) Tokyo University of Science, + supported by the JSPS KAKENHI Grant Number JP19KK0115. + ====================================================================== - $Id: pmapsrc.h,v 2.1 2015/02/24 19:39:27 greg Exp $ + $Id: pmapsrc.h,v 2.8 2024/09/17 16:36:05 greg Exp $ */ @@ -18,6 +25,9 @@ #include "ray.h" #include "source.h" +#ifdef __cplusplus +extern "C" { +#endif /* Data structures for photon emission */ @@ -51,8 +61,16 @@ } EmissionMap; + + /* Photon port flags (orientation relative to surface normal): + * Forward, backward, both (bidirectional). */ + #define PMAP_PORTFWD 1 + #define PMAP_PORTBWD 2 + #define PMAP_PORTBI (PMAP_PORTFWD | PMAP_PORTBWD) + - /* Photon port list for emission from geometry en lieu of light sources */ + /* Photon ports for emission from geometry en lieu of light sources */ + extern char *photonPortList [MAXSET + 1]; extern SRCREC *photonPorts; extern unsigned numPhotonPorts; @@ -63,8 +81,8 @@ - void getPhotonPorts (); - /* Find geometry declared as photon ports */ + void getPhotonPorts (char **portList); + /* Find geometry declared as photon ports from modifiers in portList */ void initPhotonEmissionFuncs (); /* Init photonPartition[] and photonOrigin[] dispatch tables with source @@ -86,5 +104,9 @@ void inscatterVolumePmap (RAY *r, COLOR inscatter); /* Add inscattering from volume photon map; interface to srcscatter() */ + +#ifdef __cplusplus +} +#endif #endif