--- ray/src/cv/bsdfrep.h 2014/03/06 00:40:37 2.13 +++ ray/src/cv/bsdfrep.h 2014/03/19 20:49:01 2.18 @@ -1,4 +1,4 @@ -/* RCSid $Id: bsdfrep.h,v 2.13 2014/03/06 00:40:37 greg Exp $ */ +/* RCSid $Id: bsdfrep.h,v 2.18 2014/03/19 20:49:01 greg Exp $ */ /* * Definitions for BSDF representation used to interpolate measured data. * @@ -7,8 +7,6 @@ #include "bsdf.h" -#define DEBUG 1 - #ifndef GRIDRES #define GRIDRES (1<<8) /* grid resolution per side */ #endif @@ -16,10 +14,12 @@ #define ANG2R(r) (int)((r)*((1<<16)/M_PI)) #define R2ANG(c) (((c)+.5)*(M_PI/(1<<16))) -typedef struct { - float vsum; /* DSF sum */ - unsigned int nval; /* number of values in sum */ - unsigned short crad; /* radius (coded angle) */ +typedef union { + struct { + float v; /* DSF sum */ + unsigned int n; /* number of values in sum */ + } sum; /* sum for averaging */ + float val[2]; /* comparison values */ } GRIDVAL; /* grid value */ typedef struct {