--- ray/src/rt/pmapparm.h 2018/02/02 19:47:55 2.9 +++ ray/src/rt/pmapparm.h 2024/09/17 16:36:05 2.11 @@ -1,4 +1,4 @@ -/* RCSid $Id: pmapparm.h,v 2.9 2018/02/02 19:47:55 rschregle Exp $ */ +/* RCSid $Id: pmapparm.h,v 2.11 2024/09/17 16:36:05 greg Exp $ */ /* ====================================================================== @@ -7,11 +7,14 @@ 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) + supported by the Swiss National Science Foundation + (SNSF #147053, "Daylight Redirecting Components") ====================================================================== - $Id: pmapparm.h,v 2.9 2018/02/02 19:47:55 rschregle Exp $ + $Id: pmapparm.h,v 2.11 2024/09/17 16:36:05 greg Exp $ */ @@ -20,7 +23,10 @@ #include "pmaptype.h" - +#ifdef __cplusplus +extern "C" { +#endif + /* Struct for passing params per photon map from rpict/rtrace/rvu */ typedef struct { char *fileName; /* Photon map file */ @@ -28,10 +34,14 @@ unsigned long distribTarget; /* Num photons to store */ } PhotonMapParams; - /* Bounding box for region of interest */ - typedef struct { - float min [3], max [3]; + /* Region of interest */ + typedef struct { + /* siz [1], siz [2] <= 0 --> sphere, else rectangle */ + float pos [3], siz [3]; } PhotonMapROI; + + #define PMAP_ROI_ISSPHERE(roi) ((roi)->siz[1] <= 0 && (roi)->siz[2] <= 0) + #define PMAP_ROI_SETSPHERE(roi) ((roi)->siz[1] = (roi)->siz[2] = -1) extern PhotonMapParams pmapParams [NUM_PMAP_TYPES]; @@ -69,4 +79,9 @@ unsigned long parseMultiplier (const char *num); /* Evaluate numeric parameter string with optional multiplier suffix (G = 10^9, M = 10^6, K = 10^3). Returns 0 if parsing fails. */ + +#ifdef __cplusplus +} +#endif + #endif