| 15 |
|
extern "C" { |
| 16 |
|
#endif |
| 17 |
|
|
| 18 |
< |
/* Data types for file loading */ |
| 19 |
< |
enum {DTfromHeader=0, DTrgbe, DTxyze, DTfloat, DTascii, DTdouble, DTend}; |
| 18 |
> |
/* Data types for file loading (used to be an enum) */ |
| 19 |
> |
#define DTfromHeader 0 |
| 20 |
> |
#define DTrgbe 1 |
| 21 |
> |
#define DTxyze 2 |
| 22 |
> |
#define DTspec 3 |
| 23 |
> |
#define DTfloat 4 |
| 24 |
> |
#define DTascii 5 |
| 25 |
> |
#define DTdouble 6 |
| 26 |
> |
#define DTend 7 |
| 27 |
|
|
| 28 |
+ |
extern const char stdin_name[]; |
| 29 |
|
extern const char *cm_fmt_id[]; |
| 30 |
|
extern const int cm_elem_size[]; |
| 31 |
|
|
| 50 |
|
#define cm_free(cm) free(cm) |
| 51 |
|
|
| 52 |
|
/* Load header to obtain/check data type and matrix dimensions */ |
| 53 |
< |
extern char *cm_getheader(int *dt, int *nr, int *nc, int *swp, FILE *fp); |
| 53 |
> |
extern char *cm_getheader(int *dt, int *nr, int *nc, |
| 54 |
> |
int *swp, COLOR scale, FILE *fp); |
| 55 |
|
|
| 56 |
|
/* Allocate and load a matrix from the given input (or stdin if NULL) */ |
| 57 |
|
extern CMATRIX *cm_load(const char *inspec, int nrows, int ncols, int dtype); |
| 66 |
|
extern int cm_write(const CMATRIX *cm, int dtype, FILE *fp); |
| 67 |
|
|
| 68 |
|
/* Load and convert a matrix BTDF from the given XML file */ |
| 69 |
< |
extern CMATRIX *cm_loadBTDF(char *fname); |
| 69 |
> |
extern CMATRIX *cm_loadBTDF(const char *fname); |
| 70 |
> |
|
| 71 |
> |
/* Load and convert a matrix BRDF from the given XML file */ |
| 72 |
> |
extern CMATRIX *cm_loadBRDF(const char *fname, int backside); |
| 73 |
|
|
| 74 |
|
#ifdef __cplusplus |
| 75 |
|
} |