ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapparm.h
Revision: 2.8
Committed: Mon Aug 14 21:12:10 2017 UTC (6 years, 8 months ago) by rschregle
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R1
Changes since 2.7: +12 -7 lines
Log Message:
Updated photon map code for Windows; no multproc or ooC for now

File Contents

# Content
1 /* RCSid $Id: pmapparm.h,v 2.7 2016/05/17 17:39:47 rschregle Exp $ */
2
3 /*
4 ======================================================================
5 Parameters for photon map generation and rendering; used by mkpmap
6 and rpict/rvu/rtrace.
7
8 Roland Schregle (roland.schregle@{hslu.ch, gmail.com}
9 (c) Fraunhofer Institute for Solar Energy Systems,
10 (c) Lucerne University of Applied Sciences and Arts,
11 supported by the Swiss National Science Foundation (SNSF, #147053)
12 ======================================================================
13
14 $Id: pmapparm.h,v 2.7 2016/05/17 17:39:47 rschregle Exp $
15 */
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 /* Bounding box for region of interest */
32 typedef struct {
33 float min [3], max [3];
34 } PhotonMapROI;
35
36
37 extern PhotonMapParams pmapParams [NUM_PMAP_TYPES];
38
39 /* Macros for type specific photon map parameters */
40 #define globalPmapParams (pmapParams [PMAP_TYPE_GLOBAL])
41 #define preCompPmapParams (pmapParams [PMAP_TYPE_PRECOMP])
42 #define causticPmapParams (pmapParams [PMAP_TYPE_CAUSTIC])
43 #define volumePmapParams (pmapParams [PMAP_TYPE_VOLUME])
44 #define directPmapParams (pmapParams [PMAP_TYPE_DIRECT])
45 #define contribPmapParams (pmapParams [PMAP_TYPE_CONTRIB])
46
47
48 extern float pdfSamples, preDistrib, finalGather,
49 gatherTolerance, maxDistFix;
50 extern unsigned long photonHeapSizeInc, photonMaxBounce;
51 extern unsigned photonRepTime, maxPreDistrib, defaultGather,
52 verbose;
53
54 extern unsigned pmapNumROI;
55 extern PhotonMapROI *pmapROI;
56
57 #ifdef PMAP_OOC
58 extern float pmapCachePageSize;
59 extern unsigned long pmapCacheSize;
60 #endif
61
62
63 struct PhotonMap;
64
65 int setPmapParam (struct PhotonMap **pm, const PhotonMapParams *parm);
66 /* Allocate photon map and set its parameters from parm */
67
68 unsigned long parseMultiplier (const char *num);
69 /* Evaluate numeric parameter string with optional multiplier suffix
70 (G = 10^9, M = 10^6, K = 10^3). Returns 0 if parsing fails. */
71 #endif