| 1 |
|
/* RCSid $Id$ */ |
| 2 |
+ |
|
| 3 |
|
/* |
| 4 |
< |
================================================================== |
| 5 |
< |
Photon map file I/O |
| 4 |
> |
====================================================================== |
| 5 |
> |
Photon map portable file I/O |
| 6 |
|
|
| 7 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
| 8 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
| 9 |
+ |
supported by the German Research Foundation |
| 10 |
+ |
(DFG LU-204/10-2, "Fassadenintegrierte Regelsysteme FARESYS") |
| 11 |
|
(c) Lucerne University of Applied Sciences and Arts, |
| 12 |
< |
supported by the Swiss National Science Foundation (SNSF, #147053) |
| 13 |
< |
================================================================== |
| 12 |
> |
supported by the Swiss National Science Foundation |
| 13 |
> |
(SNSF #147053, "Daylight Redirecting Components") |
| 14 |
> |
====================================================================== |
| 15 |
|
|
| 16 |
|
$Id$ |
| 17 |
|
*/ |
| 21 |
|
#define PMAPIO_H |
| 22 |
|
|
| 23 |
|
#include "pmapdata.h" |
| 24 |
+ |
|
| 25 |
+ |
|
| 26 |
+ |
/* File format version with feature suffix */ |
| 27 |
+ |
#define PMAP_FILEVER_MAJ "3.1" |
| 28 |
|
|
| 29 |
< |
#define PMAP_FILEVER 160u /* File format version */ |
| 29 |
> |
#ifdef PMAP_OOC |
| 30 |
> |
#define PMAP_FILEVER_TYP "o" |
| 31 |
> |
#else |
| 32 |
> |
#define PMAP_FILEVER_TYP "k" |
| 33 |
> |
#endif |
| 34 |
> |
|
| 35 |
> |
#ifdef PMAP_FLOAT_FLUX |
| 36 |
> |
#define PMAP_FILEVER_FLX "f" |
| 37 |
> |
#else |
| 38 |
> |
#define PMAP_FILEVER_FLX "" |
| 39 |
> |
#endif |
| 40 |
> |
|
| 41 |
> |
#ifdef PMAP_PRIMARYPOS |
| 42 |
> |
#define PMAP_FILEVER_PRIPOS "P" |
| 43 |
> |
#else |
| 44 |
> |
#define PMAP_FILEVER_PRIPOS "" |
| 45 |
> |
#endif |
| 46 |
> |
|
| 47 |
> |
#ifdef PMAP_PRIMARYDIR |
| 48 |
> |
#define PMAP_FILEVER_PRIDIR "D" |
| 49 |
> |
#else |
| 50 |
> |
#define PMAP_FILEVER_PRIDIR "" |
| 51 |
> |
#endif |
| 52 |
|
|
| 53 |
+ |
#define PMAP_FILEVER (PMAP_FILEVER_MAJ PMAP_FILEVER_TYP \ |
| 54 |
+ |
PMAP_FILEVER_FLX PMAP_FILEVER_PRIPOS \ |
| 55 |
+ |
PMAP_FILEVER_PRIDIR) |
| 56 |
+ |
|
| 57 |
+ |
/* Maximum portable size of a long int in photon map file */ |
| 58 |
+ |
#define PMAP_LONGSIZE 8 |
| 59 |
+ |
|
| 60 |
+ |
|
| 61 |
|
void savePhotonMap (const PhotonMap *pmap, const char *fname, |
| 62 |
|
int argc, char **argv); |
| 63 |
|
/* Save portable photon map of specified type to filename, |
| 68 |
|
* map type as identified from file header. */ |
| 69 |
|
|
| 70 |
|
#endif |
| 71 |
+ |
|