ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapray.c
Revision: 2.4
Committed: Tue Aug 18 18:45:55 2015 UTC (8 years, 9 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.3: +4 -1 lines
Log Message:
Added missing RCSid forgotten during initial check-in

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id$";
3 #endif
4 /*
5 ==================================================================
6 Photon map interface to RADIANCE raycalls
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: pmapray.c,v 2.3 2015/05/22 14:09:01 greg Exp $
15 */
16
17
18 #include "pmapray.h"
19 #include "pmap.h"
20
21
22 void ray_init_pmap ()
23 /* Interface to ray_init(); init & load photon maps */
24 {
25 loadPmaps(photonMaps, pmapParams);
26 }
27
28
29 void ray_done_pmap ()
30 /* Interface to ray_done(); free photon maps */
31 {
32 cleanUpPmaps(photonMaps);
33 }
34
35
36 void ray_save_pmap (RAYPARAMS *rp)
37 /* Interface to ray_save(); save photon map params */
38 {
39 unsigned t;
40
41 for (t = 0; t < NUM_PMAP_TYPES; t++) {
42 if (pmapParams [t].fileName)
43 rp -> pmapParams [t].fileName = savqstr(pmapParams [t].fileName);
44
45 else rp -> pmapParams [t].fileName = NULL;
46
47 rp -> pmapParams [t].minGather = pmapParams [t].minGather;
48 rp -> pmapParams [t].maxGather = pmapParams [t].maxGather;
49 }
50 }
51
52
53 void ray_restore_pmap (RAYPARAMS *rp)
54 /* Interface to ray_restore(); restore photon mapping params */
55 {
56 unsigned t;
57
58 for (t = 0; t < NUM_PMAP_TYPES; t++) {
59 pmapParams [t].fileName = rp -> pmapParams [t].fileName;
60 pmapParams [t].minGather = rp -> pmapParams [t].minGather;
61 pmapParams [t].maxGather = rp -> pmapParams [t].maxGather;
62 }
63 }