ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/bsdfrep.h
(Generate patch)

Comparing ray/src/cv/bsdfrep.h (file contents):
Revision 2.22 by greg, Fri Aug 22 05:38:44 2014 UTC vs.
Revision 2.25 by greg, Mon Oct 26 21:12:20 2020 UTC

# Line 34 | Line 34 | typedef union {
34  
35   typedef struct {
36          float           peak;           /* lobe value at peak */
37 +        C_CHROMA        chroma;         /* encoded chromaticity */
38          unsigned short  crad;           /* radius (coded angle) */
39 <        unsigned char   gx, gy;         /* grid position */
39 >        unsigned short  gx, gy;         /* grid position */
40   } RBFVAL;                       /* radial basis function value */
41  
42   struct s_rbfnode;               /* forward declaration of RBF struct */
# Line 82 | Line 83 | extern int             single_plane_incident;
83   extern int              input_orient;
84   extern int              output_orient;
85  
86 +                                /* represented colorimetry */
87 + typedef enum {RBCphotopic, RBCtristimulus, RBCspectral, RBCunknown} RBColor;
88 +
89 + extern RBColor          rbf_colorimetry;
90 +
91 + extern const char       *RBCident[];
92 +
93                                  /* log BSDF histogram */
94   #define HISTLEN         256
95   #define BSDF2BIG        (1./M_PI)
# Line 93 | Line 101 | extern unsigned long   bsdf_hist[HISTLEN];
101  
102                                  /* BSDF value for boundary regions */
103   extern double           bsdf_min;
104 < extern double           bsdf_spec_peak;
104 > extern double           bsdf_spec_val;
105   extern double           bsdf_spec_rad;
106  
107                                  /* processed incident DSF measurements */
# Line 114 | Line 122 | extern MIGRATION       *mig_list;
122  
123   #define BSDFREP_FMT     "BSDF_RBFmesh"
124  
125 + #define BSDFREP_MAGIC   0x5a3c
126 +
127                                  /* global argv[0] */
128   extern char             *progname;
129  
# Line 125 | Line 135 | extern char            *progname;
135                                  /* our loaded grid for this incident angle */
136   extern double           theta_in_deg, phi_in_deg;
137   extern GRIDVAL          dsf_grid[GRIDRES][GRIDRES];
138 + extern float            (*spec_grid)[GRIDRES][GRIDRES];
139 + extern int              nspec_grid;
140  
141 +                                /* header line sharing callback */
142 + extern int              (*sir_headshare)(char *s);
143 +
144 +
145   /* Register new input direction */
146   extern int              new_input_direction(double new_theta, double new_phi);
147  
# Line 156 | Line 172 | extern void            pos_from_vec(int pos[2], const FVECT vec)
172   /* Evaluate BSDF at the given normalized outgoing direction */
173   extern double           eval_rbfrep(const RBFNODE *rp, const FVECT outvec);
174  
175 + extern SDError          eval_rbfcol(SDValue *sv,
176 +                                        const RBFNODE *rp, const FVECT outvec);
177 +
178   /* Insert a new directional scattering function in our global list */
179   extern int              insert_dsf(RBFNODE *newrbf);
180  
# Line 182 | Line 201 | extern void            save_bsdf_rep(FILE *ofp);
201   /* Read a BSDF mesh interpolant from the given binary stream */
202   extern int              load_bsdf_rep(FILE *ifp);
203  
204 + /* Set up visible spectrum sampling */
205 + extern void             set_spectral_samples(int nspec);
206 +
207   /* Start new DSF input grid */
208   extern void             new_bsdf_data(double new_theta, double new_phi);
209  
210   /* Add BSDF data point */
211   extern void             add_bsdf_data(double theta_out, double phi_out,
212 <                                        double val, int isDSF);
212 >                                        const double val[], int isDSF);
213  
214   /* Count up filled nodes and build RBF representation from current grid */
215   extern RBFNODE *        make_rbfrep(void);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines