5 |
|
* G. Ward |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#ifndef _BSDFREP_H_ |
9 |
+ |
#define _BSDFREP_H_ |
10 |
+ |
|
11 |
|
#include "bsdf.h" |
12 |
|
|
13 |
< |
#define DEBUG 1 |
13 |
> |
#ifdef __cplusplus |
14 |
> |
extern "C" { |
15 |
> |
#endif |
16 |
|
|
17 |
|
#ifndef GRIDRES |
18 |
|
#define GRIDRES (1<<8) /* grid resolution per side */ |
21 |
|
#define ANG2R(r) (int)((r)*((1<<16)/M_PI)) |
22 |
|
#define R2ANG(c) (((c)+.5)*(M_PI/(1<<16))) |
23 |
|
|
24 |
< |
typedef struct { |
25 |
< |
float vsum; /* DSF sum */ |
26 |
< |
unsigned int nval; /* number of values in sum */ |
24 |
> |
typedef union { |
25 |
> |
struct { |
26 |
> |
float v; /* DSF sum */ |
27 |
> |
unsigned int n; /* number of values in sum */ |
28 |
> |
} sum; /* sum for averaging */ |
29 |
> |
float val[2]; /* comparison values */ |
30 |
|
} GRIDVAL; /* grid value */ |
31 |
|
|
32 |
|
typedef struct { |
197 |
|
extern RBFNODE * e_advect_rbf(const MIGRATION *mig, |
198 |
|
const FVECT invec, int lobe_lim); |
199 |
|
|
200 |
+ |
/* Compute distance between two RBF lobes (internal call) */ |
201 |
+ |
extern double lobe_distance(RBFVAL *rbf1, RBFVAL *rbf2); |
202 |
+ |
|
203 |
+ |
/* Compute mass transport plan (internal call) */ |
204 |
+ |
extern void plan_transport(MIGRATION *mig); |
205 |
+ |
|
206 |
|
/* Partially advect between recorded incident angles and allocate new RBF */ |
207 |
|
extern RBFNODE * advect_rbf(const FVECT invec, int lobe_lim); |
208 |
+ |
|
209 |
+ |
#ifdef __cplusplus |
210 |
+ |
} |
211 |
+ |
#endif |
212 |
+ |
#endif /* _BSDFREP_H_ */ |