19 |
|
unsigned long latick; /* last accessed tick */ |
20 |
|
float pos[3]; /* position in space */ |
21 |
|
float dir[3]; /* normal direction */ |
22 |
< |
int lvl; /* recursion level of parent ray */ |
22 |
> |
int lvl; /* recursion level of parent ray */ |
23 |
|
float weight; /* weight of parent ray */ |
24 |
|
float rad; /* validity radius */ |
25 |
|
COLOR val; /* computed ambient value */ |
42 |
|
} AMBSAMP; /* ambient sample division */ |
43 |
|
|
44 |
|
typedef struct { |
45 |
< |
COLOR acoef; /* coefficient for rayorigin() */ |
45 |
> |
COLOR acoef; /* ambient contribution coefficient */ |
46 |
> |
float drc; /* daughter ray coefficient */ |
47 |
|
FVECT ux, uy, uz; /* x, y and z axis directions */ |
48 |
|
short nt, np; /* number of theta and phi directions */ |
49 |
+ |
int ns; /* number of super-samples */ |
50 |
|
} AMBHEMI; /* ambient sample hemisphere */ |
51 |
|
|
52 |
|
extern double maxarad; /* maximum ambient radius */ |
67 |
|
extern void multambient(COLOR aval, RAY *r, FVECT nrm); |
68 |
|
extern void ambdone(void); |
69 |
|
extern void ambnotify(OBJECT obj); |
70 |
< |
extern double sumambient(COLOR acol, RAY *r, FVECT rn, int al, |
70 |
> |
extern double sumambient(COLOR acol, RAY *r, double rw, FVECT rn, int al, |
71 |
|
AMBTREE *at, FVECT c0, double s); |
72 |
|
extern double makeambient(COLOR acol, RAY *r, COLOR ac, FVECT rn, int al); |
73 |
|
extern void extambient(COLOR cr, AMBVAL *ap, FVECT pv, FVECT nv); |
75 |
|
/* defined in ambcomp.c */ |
76 |
|
extern double doambient(COLOR acol, RAY *r, COLOR ac, double wt, |
77 |
|
FVECT pg, FVECT dg); |
78 |
< |
extern int inithemi(AMBHEMI *hp, RAY *r, COLOR ac, double wt); |
78 |
> |
extern void inithemi(AMBHEMI *hp, RAY *r, COLOR ac, double wt); |
79 |
|
extern int divsample(AMBSAMP *dp, AMBHEMI *h, RAY *r); |
80 |
|
extern void comperrs(AMBSAMP *da, AMBHEMI *hp); |
81 |
|
extern void posgradient(FVECT gv, AMBSAMP *da, AMBHEMI *hp); |