ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapparm.h
Revision: 2.10
Committed: Wed Apr 14 11:26:25 2021 UTC (3 years, 1 month ago) by rschregle
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 2.9: +13 -6 lines
Log Message:
feat(mkpmap): Added -apI option for spherical ROI

File Contents

# User Rev Content
1 rschregle 2.10 /* RCSid $Id: pmapparm.h,v 2.9 2018/02/02 19:47:55 rschregle Exp $ */
2 rschregle 2.7
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.10 supported by the German Research Foundation
11     (DFG LU-204/10-2, "Fassadenintegrierte Regelsysteme" (FARESYS))
12 rschregle 2.2 (c) Lucerne University of Applied Sciences and Arts,
13 rschregle 2.10 supported by the Swiss National Science Foundation
14     (SNSF #147053, "Daylight Redirecting Components")
15 rschregle 2.7 ======================================================================
16    
17 rschregle 2.10 $Id: pmapparm.h,v 2.9 2018/02/02 19:47:55 rschregle Exp $
18 greg 2.1 */
19    
20    
21     #ifndef PMAPPARAMS_H
22     #define PMAPPARAMS_H
23    
24     #include "pmaptype.h"
25    
26    
27     /* Struct for passing params per photon map from rpict/rtrace/rvu */
28     typedef struct {
29     char *fileName; /* Photon map file */
30     unsigned minGather, maxGather; /* Num photons to gather */
31     unsigned long distribTarget; /* Num photons to store */
32     } PhotonMapParams;
33 rschregle 2.8
34 rschregle 2.10 /* Region of interest */
35     typedef struct {
36     /* siz [1], siz [2] <= 0 --> sphere, else rectangle */
37     float pos [3], siz [3];
38 rschregle 2.8 } PhotonMapROI;
39 rschregle 2.10
40     #define PMAP_ROI_ISSPHERE(roi) ((roi)->siz[1] <= 0 && (roi)->siz[2] <= 0)
41     #define PMAP_ROI_SETSPHERE(roi) ((roi)->siz[1] = (roi)->siz[2] = -1)
42 greg 2.1
43    
44     extern PhotonMapParams pmapParams [NUM_PMAP_TYPES];
45    
46     /* Macros for type specific photon map parameters */
47     #define globalPmapParams (pmapParams [PMAP_TYPE_GLOBAL])
48     #define preCompPmapParams (pmapParams [PMAP_TYPE_PRECOMP])
49     #define causticPmapParams (pmapParams [PMAP_TYPE_CAUSTIC])
50     #define volumePmapParams (pmapParams [PMAP_TYPE_VOLUME])
51     #define directPmapParams (pmapParams [PMAP_TYPE_DIRECT])
52     #define contribPmapParams (pmapParams [PMAP_TYPE_CONTRIB])
53    
54    
55 rschregle 2.7 extern float pdfSamples, preDistrib, finalGather,
56 rschregle 2.9 gatherTolerance, maxDistFix, pmapMaxDist,
57     photonMaxDist;
58 rschregle 2.7 extern unsigned long photonHeapSizeInc, photonMaxBounce;
59 rschregle 2.8 extern unsigned photonRepTime, maxPreDistrib, defaultGather,
60     verbose;
61    
62     extern unsigned pmapNumROI;
63     extern PhotonMapROI *pmapROI;
64 greg 2.1
65 rschregle 2.7 #ifdef PMAP_OOC
66     extern float pmapCachePageSize;
67     extern unsigned long pmapCacheSize;
68     #endif
69    
70    
71 greg 2.1 struct PhotonMap;
72    
73     int setPmapParam (struct PhotonMap **pm, const PhotonMapParams *parm);
74     /* Allocate photon map and set its parameters from parm */
75    
76     unsigned long parseMultiplier (const char *num);
77     /* Evaluate numeric parameter string with optional multiplier suffix
78     (G = 10^9, M = 10^6, K = 10^3). Returns 0 if parsing fails. */
79     #endif