--- ray/src/util/cmatrix.h 2019/08/14 18:20:02 2.10 +++ ray/src/util/cmatrix.h 2025/04/04 18:06:48 2.15 @@ -1,4 +1,4 @@ -/* RCSid $Id: cmatrix.h,v 2.10 2019/08/14 18:20:02 greg Exp $ */ +/* RCSid $Id: cmatrix.h,v 2.15 2025/04/04 18:06:48 greg Exp $ */ /* * Color matrix routine declarations. * @@ -15,9 +15,17 @@ extern "C" { #endif -/* Data types for file loading */ -enum {DTfromHeader=0, DTascii, DTrgbe, DTxyze, DTfloat, DTdouble, DTend}; +/* Data types for file loading (used to be an enum) */ +#define DTfromHeader 0 +#define DTrgbe 1 +#define DTxyze 2 +#define DTspec 3 +#define DTfloat 4 +#define DTascii 5 +#define DTdouble 6 +#define DTend 7 +extern const char stdin_name[]; extern const char *cm_fmt_id[]; extern const int cm_elem_size[]; @@ -42,7 +50,8 @@ extern CMATRIX *cm_resize(CMATRIX *cm, int nrows); #define cm_free(cm) free(cm) /* Load header to obtain/check data type and matrix dimensions */ -extern char *cm_getheader(int *dt, int *nr, int *nc, int *swp, FILE *fp); +extern char *cm_getheader(int *dt, int *nr, int *nc, + int *swp, COLOR scale, FILE *fp); /* Allocate and load a matrix from the given input (or stdin if NULL) */ extern CMATRIX *cm_load(const char *inspec, int nrows, int ncols, int dtype); @@ -57,7 +66,10 @@ extern CMATRIX *cm_multiply(const CMATRIX *cm1, const extern int cm_write(const CMATRIX *cm, int dtype, FILE *fp); /* Load and convert a matrix BTDF from the given XML file */ -extern CMATRIX *cm_loadBTDF(char *fname); +extern CMATRIX *cm_loadBTDF(const char *fname); + +/* Load and convert a matrix BRDF from the given XML file */ +extern CMATRIX *cm_loadBRDF(const char *fname, int backside); #ifdef __cplusplus }