--- ray/src/cv/bsdfrep.h 2013/09/26 17:05:00 2.8 +++ ray/src/cv/bsdfrep.h 2014/02/19 05:16:06 2.12 @@ -1,4 +1,4 @@ -/* RCSid $Id: bsdfrep.h,v 2.8 2013/09/26 17:05:00 greg Exp $ */ +/* RCSid $Id: bsdfrep.h,v 2.12 2014/02/19 05:16:06 greg Exp $ */ /* * Definitions for BSDF representation used to interpolate measured data. * @@ -10,7 +10,7 @@ #define DEBUG 1 #ifndef GRIDRES -#define GRIDRES 200 /* grid resolution per side */ +#define GRIDRES (1<<8) /* grid resolution per side */ #endif /* convert to/from coded radians */ #define ANG2R(r) (int)((r)*((1<<16)/M_PI)) @@ -18,7 +18,7 @@ typedef struct { float vsum; /* DSF sum */ - unsigned short nval; /* number of values in sum */ + unsigned int nval; /* number of values in sum */ unsigned short crad; /* radius (coded angle) */ } GRIDVAL; /* grid value */ @@ -57,6 +57,9 @@ typedef struct s_rbfnode { #define INP_QUAD3 4 /* 180-270 degree quadrant */ #define INP_QUAD4 8 /* 270-360 degree quadrant */ + /* name and manufacturer if known */ +extern char bsdf_name[]; +extern char bsdf_manuf[]; /* active grid resolution */ extern int grid_res; /* coverage/symmetry using INP_QUAD? flags */ @@ -74,7 +77,7 @@ extern int output_orient; #define BSDF2BIG (1./M_PI) #define BSDF2SML 1e-8 #define HISTLNR 17.2759509 /* log(BSDF2BIG/BSDF2SML) */ -extern int bsdf_hist[HISTLEN]; +extern unsigned long bsdf_hist[HISTLEN]; #define histndx(v) (int)(log((v)*(1./BSDF2SML))*(HISTLEN/HISTLNR)) #define histval(i) (exp(((i)+.5)*(HISTLNR/HISTLEN))*BSDF2SML) @@ -182,6 +185,10 @@ extern void build_mesh(void); /* Find edge(s) for interpolating the given vector, applying symmetry */ extern int get_interp(MIGRATION *miga[3], FVECT invec); + +/* Advect and allocate new RBF along edge (internal call) */ +extern RBFNODE * e_advect_rbf(const MIGRATION *mig, + const FVECT invec, int lobe_lim); /* Partially advect between recorded incident angles and allocate new RBF */ extern RBFNODE * advect_rbf(const FVECT invec, int lobe_lim);