| 1 | rschregle | 2.7 | /* RCSid $Id: pmapparm.h,v 1.9 2016/02/12 12:51:59 taschreg Exp taschreg $ */ | 
| 2 |  |  |  | 
| 3 | greg | 2.1 | /* | 
| 4 | rschregle | 2.7 | ====================================================================== | 
| 5 |  |  | Parameters for photon map generation and rendering; used by mkpmap | 
| 6 |  |  | and rpict/rvu/rtrace. | 
| 7 | greg | 2.1 |  | 
| 8 |  |  | Roland Schregle (roland.schregle@{hslu.ch, gmail.com} | 
| 9 |  |  | (c) Fraunhofer Institute for Solar Energy Systems, | 
| 10 | rschregle | 2.2 | (c) Lucerne University of Applied Sciences and Arts, | 
| 11 | rschregle | 2.7 | supported by the Swiss National Science Foundation (SNSF, #147053) | 
| 12 |  |  | ====================================================================== | 
| 13 |  |  |  | 
| 14 |  |  | $Id: pmapparm.h,v 1.9 2016/02/12 12:51:59 taschreg Exp taschreg $ | 
| 15 | greg | 2.1 | */ | 
| 16 |  |  |  | 
| 17 |  |  |  | 
| 18 |  |  | #ifndef PMAPPARAMS_H | 
| 19 |  |  | #define PMAPPARAMS_H | 
| 20 |  |  |  | 
| 21 |  |  | #include "pmaptype.h" | 
| 22 |  |  |  | 
| 23 |  |  |  | 
| 24 |  |  | /* Struct for passing params per photon map from rpict/rtrace/rvu */ | 
| 25 |  |  | typedef struct { | 
| 26 |  |  | char *fileName;                /* Photon map file */ | 
| 27 |  |  | unsigned minGather, maxGather; /* Num photons to gather */ | 
| 28 |  |  | unsigned long distribTarget;   /* Num photons to store */ | 
| 29 |  |  | } PhotonMapParams; | 
| 30 |  |  |  | 
| 31 |  |  |  | 
| 32 |  |  | extern PhotonMapParams pmapParams [NUM_PMAP_TYPES]; | 
| 33 |  |  |  | 
| 34 |  |  | /* Macros for type specific photon map parameters */ | 
| 35 |  |  | #define globalPmapParams     (pmapParams [PMAP_TYPE_GLOBAL]) | 
| 36 |  |  | #define preCompPmapParams  (pmapParams [PMAP_TYPE_PRECOMP]) | 
| 37 |  |  | #define causticPmapParams    (pmapParams [PMAP_TYPE_CAUSTIC]) | 
| 38 |  |  | #define volumePmapParams     (pmapParams [PMAP_TYPE_VOLUME]) | 
| 39 |  |  | #define directPmapParams     (pmapParams [PMAP_TYPE_DIRECT]) | 
| 40 |  |  | #define contribPmapParams  (pmapParams [PMAP_TYPE_CONTRIB]) | 
| 41 |  |  |  | 
| 42 |  |  |  | 
| 43 | rschregle | 2.7 | extern float         pdfSamples, preDistrib, finalGather, | 
| 44 |  |  | gatherTolerance, maxDistFix; | 
| 45 |  |  | extern unsigned long photonHeapSizeInc, photonMaxBounce; | 
| 46 |  |  | extern unsigned      photonRepTime, maxPreDistrib, defaultGather; | 
| 47 |  |  |  | 
| 48 | greg | 2.1 | #ifdef PMAP_ROI | 
| 49 |  |  | extern float pmapROI [6]; | 
| 50 |  |  | #endif | 
| 51 |  |  |  | 
| 52 | rschregle | 2.7 | #ifdef PMAP_OOC | 
| 53 |  |  | extern float         pmapCachePageSize; | 
| 54 |  |  | extern unsigned long pmapCacheSize; | 
| 55 |  |  | #endif | 
| 56 |  |  |  | 
| 57 |  |  |  | 
| 58 | greg | 2.1 | struct PhotonMap; | 
| 59 |  |  |  | 
| 60 |  |  | int setPmapParam (struct PhotonMap **pm, const PhotonMapParams *parm); | 
| 61 |  |  | /* Allocate photon map and set its parameters from parm */ | 
| 62 |  |  |  | 
| 63 |  |  | unsigned long parseMultiplier (const char *num); | 
| 64 |  |  | /* Evaluate numeric parameter string with optional multiplier suffix | 
| 65 |  |  | (G = 10^9, M = 10^6, K = 10^3). Returns 0 if parsing fails. */ | 
| 66 |  |  | #endif |