| 1 |
/* RCSid $Id: pmapio.h,v 2.6 2016/05/17 17:39:47 rschregle Exp $ */ |
| 2 |
|
| 3 |
/* |
| 4 |
====================================================================== |
| 5 |
Photon map file I/O |
| 6 |
|
| 7 |
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
| 8 |
(c) Fraunhofer Institute for Solar Energy Systems, |
| 9 |
(c) Lucerne University of Applied Sciences and Arts, |
| 10 |
supported by the Swiss National Science Foundation (SNSF, #147053) |
| 11 |
====================================================================== |
| 12 |
|
| 13 |
$Id: pmapio.h,v 2.6 2016/05/17 17:39:47 rschregle Exp $ |
| 14 |
*/ |
| 15 |
|
| 16 |
|
| 17 |
#ifndef PMAPIO_H |
| 18 |
#define PMAPIO_H |
| 19 |
|
| 20 |
#include "pmapdata.h" |
| 21 |
|
| 22 |
|
| 23 |
/* File format version with feature suffix */ |
| 24 |
#define PMAP_FILEVER_MAJ "3.1" |
| 25 |
|
| 26 |
#ifdef PMAP_OOC |
| 27 |
#define PMAP_FILEVER_TYP "o" |
| 28 |
#else |
| 29 |
#define PMAP_FILEVER_TYP "k" |
| 30 |
#endif |
| 31 |
|
| 32 |
#ifdef PMAP_FLOAT_FLUX |
| 33 |
#define PMAP_FILEVER_FLX "f" |
| 34 |
#else |
| 35 |
#define PMAP_FILEVER_FLX "" |
| 36 |
#endif |
| 37 |
|
| 38 |
#ifdef PMAP_PRIMARYPOS |
| 39 |
#define PMAP_FILEVER_PRIPOS "P" |
| 40 |
#else |
| 41 |
#define PMAP_FILEVER_PRIPOS "" |
| 42 |
#endif |
| 43 |
|
| 44 |
#ifdef PMAP_PRIMARYDIR |
| 45 |
#define PMAP_FILEVER_PRIDIR "D" |
| 46 |
#else |
| 47 |
#define PMAP_FILEVER_PRIDIR "" |
| 48 |
#endif |
| 49 |
|
| 50 |
#define PMAP_FILEVER (PMAP_FILEVER_MAJ PMAP_FILEVER_TYP \ |
| 51 |
PMAP_FILEVER_FLX PMAP_FILEVER_PRIPOS \ |
| 52 |
PMAP_FILEVER_PRIDIR) |
| 53 |
|
| 54 |
|
| 55 |
void savePhotonMap (const PhotonMap *pmap, const char *fname, |
| 56 |
int argc, char **argv); |
| 57 |
/* Save portable photon map of specified type to filename, |
| 58 |
along with the corresponding command line. */ |
| 59 |
|
| 60 |
PhotonMapType loadPhotonMap (PhotonMap *pmap, const char* fname); |
| 61 |
/* Load portable photon map from specified filename, and return photon |
| 62 |
* map type as identified from file header. */ |
| 63 |
|
| 64 |
#endif |
| 65 |
|