10 |
|
#define DEBUG 1 |
11 |
|
|
12 |
|
#ifndef GRIDRES |
13 |
< |
#define GRIDRES 200 /* grid resolution per side */ |
13 |
> |
#define GRIDRES (1<<8) /* grid resolution per side */ |
14 |
|
#endif |
15 |
|
/* convert to/from coded radians */ |
16 |
|
#define ANG2R(r) (int)((r)*((1<<16)/M_PI)) |
17 |
|
#define R2ANG(c) (((c)+.5)*(M_PI/(1<<16))) |
18 |
|
|
19 |
< |
typedef struct { |
20 |
< |
float vsum; /* DSF sum */ |
21 |
< |
unsigned int nval; /* number of values in sum */ |
22 |
< |
unsigned short crad; /* radius (coded angle) */ |
19 |
> |
typedef union { |
20 |
> |
struct { |
21 |
> |
float v; /* DSF sum */ |
22 |
> |
unsigned int n; /* number of values in sum */ |
23 |
> |
} sum; /* sum for averaging */ |
24 |
> |
float val[2]; /* comparison values */ |
25 |
|
} GRIDVAL; /* grid value */ |
26 |
|
|
27 |
|
typedef struct { |
59 |
|
#define INP_QUAD3 4 /* 180-270 degree quadrant */ |
60 |
|
#define INP_QUAD4 8 /* 270-360 degree quadrant */ |
61 |
|
|
62 |
+ |
/* name and manufacturer if known */ |
63 |
+ |
extern char bsdf_name[]; |
64 |
+ |
extern char bsdf_manuf[]; |
65 |
|
/* active grid resolution */ |
66 |
|
extern int grid_res; |
67 |
|
/* coverage/symmetry using INP_QUAD? flags */ |
108 |
|
extern char *progname; |
109 |
|
|
110 |
|
/* get theta value in degrees [0,180) range */ |
111 |
< |
#define get_theta180(v) ((180./M_PI)*acos((v)[2])) |
111 |
> |
#define get_theta180(v) ((180./M_PI)*Acos((v)[2])) |
112 |
|
/* get phi value in degrees, [0,360) range */ |
113 |
|
#define get_phi360(v) ((180./M_PI)*atan2((v)[1],(v)[0]) + 360.*((v)[1]<0)) |
114 |
|
|
187 |
|
|
188 |
|
/* Find edge(s) for interpolating the given vector, applying symmetry */ |
189 |
|
extern int get_interp(MIGRATION *miga[3], FVECT invec); |
190 |
+ |
|
191 |
+ |
/* Advect and allocate new RBF along edge (internal call) */ |
192 |
+ |
extern RBFNODE * e_advect_rbf(const MIGRATION *mig, |
193 |
+ |
const FVECT invec, int lobe_lim); |
194 |
|
|
195 |
|
/* Partially advect between recorded incident angles and allocate new RBF */ |
196 |
|
extern RBFNODE * advect_rbf(const FVECT invec, int lobe_lim); |