ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapparm.h
Revision: 2.1
Committed: Tue Feb 24 19:39:27 2015 UTC (9 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
Log Message:
Initial check-in of photon map addition by Roland Schregle

File Contents

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