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