1 |
greg |
2.6 |
/* RCSid $Id: pmapparm.h,v 2.5 2015/08/18 18:45:55 greg Exp $ */ |
2 |
greg |
2.1 |
/* |
3 |
|
|
================================================================== |
4 |
rschregle |
2.3 |
Parameters for photon map generation; used by MKPMAP |
5 |
|
|
For inclusion in mkpmap.c |
6 |
greg |
2.1 |
|
7 |
|
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com} |
8 |
|
|
(c) Fraunhofer Institute for Solar Energy Systems, |
9 |
rschregle |
2.2 |
(c) Lucerne University of Applied Sciences and Arts, |
10 |
|
|
supported by the Swiss National Science Foundation (SNSF, #147053) |
11 |
greg |
2.1 |
================================================================== |
12 |
greg |
2.6 |
|
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 |
rschregle |
2.4 |
extern float pdfSamples, preDistrib, finalGather, gatherTolerance, |
42 |
|
|
maxDistFix; |
43 |
greg |
2.1 |
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 |