| 5 |
|
* G. Ward |
| 6 |
|
*/ |
| 7 |
|
|
| 8 |
+ |
#ifndef _BSDFREP_H_ |
| 9 |
+ |
#define _BSDFREP_H_ |
| 10 |
+ |
|
| 11 |
|
#include "bsdf.h" |
| 12 |
|
|
| 13 |
+ |
#ifdef __cplusplus |
| 14 |
+ |
extern "C" { |
| 15 |
+ |
#endif |
| 16 |
+ |
|
| 17 |
|
#ifndef GRIDRES |
| 18 |
|
#define GRIDRES (1<<8) /* grid resolution per side */ |
| 19 |
|
#endif |
| 90 |
|
|
| 91 |
|
/* BSDF value for boundary regions */ |
| 92 |
|
extern double bsdf_min; |
| 93 |
+ |
extern double bsdf_spec_peak; |
| 94 |
+ |
extern double bsdf_spec_rad; |
| 95 |
|
|
| 96 |
|
/* processed incident DSF measurements */ |
| 97 |
|
extern RBFNODE *dsf_list; |
| 150 |
|
/* Compute grid position from normalized input/output vector */ |
| 151 |
|
extern void pos_from_vec(int pos[2], const FVECT vec); |
| 152 |
|
|
| 153 |
< |
/* Evaluate RBF for DSF at the given normalized outgoing direction */ |
| 153 |
> |
/* Evaluate BSDF at the given normalized outgoing direction */ |
| 154 |
|
extern double eval_rbfrep(const RBFNODE *rp, const FVECT outvec); |
| 155 |
|
|
| 156 |
|
/* Insert a new directional scattering function in our global list */ |
| 195 |
|
/* Find edge(s) for interpolating the given vector, applying symmetry */ |
| 196 |
|
extern int get_interp(MIGRATION *miga[3], FVECT invec); |
| 197 |
|
|
| 198 |
+ |
/* Return single-lobe specular RBF for the given incident direction */ |
| 199 |
+ |
extern RBFNODE * def_rbf_spec(const FVECT invec); |
| 200 |
+ |
|
| 201 |
|
/* Advect and allocate new RBF along edge (internal call) */ |
| 202 |
|
extern RBFNODE * e_advect_rbf(const MIGRATION *mig, |
| 203 |
|
const FVECT invec, int lobe_lim); |
| 204 |
|
|
| 205 |
+ |
/* Compute distance between two RBF lobes (internal call) */ |
| 206 |
+ |
extern double lobe_distance(RBFVAL *rbf1, RBFVAL *rbf2); |
| 207 |
+ |
|
| 208 |
+ |
/* Compute mass transport plan (internal call) */ |
| 209 |
+ |
extern void plan_transport(MIGRATION *mig); |
| 210 |
+ |
|
| 211 |
|
/* Partially advect between recorded incident angles and allocate new RBF */ |
| 212 |
|
extern RBFNODE * advect_rbf(const FVECT invec, int lobe_lim); |
| 213 |
+ |
|
| 214 |
+ |
#ifdef __cplusplus |
| 215 |
+ |
} |
| 216 |
+ |
#endif |
| 217 |
+ |
#endif /* _BSDFREP_H_ */ |