--- ray/src/rt/pmapsrc.h 2016/05/17 17:39:47 2.5 +++ ray/src/rt/pmapsrc.h 2024/09/17 16:36:05 2.8 @@ -1,16 +1,20 @@ -/* RCSid $Id: pmapsrc.h,v 2.5 2016/05/17 17:39:47 rschregle Exp $ */ +/* 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, + 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) - ================================================================== + 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.5 2016/05/17 17:39:47 rschregle Exp $ + $Id: pmapsrc.h,v 2.8 2024/09/17 16:36:05 greg Exp $ */ @@ -21,6 +25,9 @@ #include "ray.h" #include "source.h" +#ifdef __cplusplus +extern "C" { +#endif /* Data structures for photon emission */ @@ -54,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; @@ -66,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 @@ -89,5 +104,9 @@ void inscatterVolumePmap (RAY *r, COLOR inscatter); /* Add inscattering from volume photon map; interface to srcscatter() */ + +#ifdef __cplusplus +} +#endif #endif