16 |
|
* and don't pass these vectors to fvect routines. |
17 |
|
*/ |
18 |
|
typedef struct ambrec { |
19 |
+ |
struct ambrec *next; /* next in list */ |
20 |
|
unsigned long latick; /* last accessed tick */ |
21 |
|
float pos[3]; /* position in space */ |
22 |
|
float dir[3]; /* normal direction */ |
26 |
|
COLOR val; /* computed ambient value */ |
27 |
|
float gpos[3]; /* gradient wrt. position */ |
28 |
|
float gdir[3]; /* gradient wrt. direction */ |
28 |
– |
struct ambrec *next; /* next in list */ |
29 |
|
} AMBVAL; /* ambient value */ |
30 |
|
|
31 |
|
typedef struct ambtree { |
37 |
|
COLOR v; /* division sum (partial) */ |
38 |
|
float r; /* 1/distance sum */ |
39 |
|
float k; /* variance for this division */ |
40 |
< |
int n; /* number of subsamples */ |
41 |
< |
short t, p; /* theta, phi indices */ |
40 |
> |
int n; /* number of subsamples */ |
41 |
> |
unsigned short t, p; /* theta, phi indices */ |
42 |
|
} AMBSAMP; /* ambient sample division */ |
43 |
|
|
44 |
|
typedef struct { |
45 |
|
FVECT ux, uy, uz; /* x, y and z axis directions */ |
46 |
|
COLOR acoef; /* division contribution coefficient */ |
47 |
|
int ns; /* number of super-samples */ |
48 |
< |
short nt, np; /* number of theta and phi directions */ |
48 |
> |
int nt, np; /* number of theta and phi directions */ |
49 |
|
} AMBHEMI; /* ambient sample hemisphere */ |
50 |
|
|
51 |
|
extern double maxarad; /* maximum ambient radius */ |