22 |
|
extern void SDsquare2disk(double ds[2], double seedx, double seedy); |
23 |
|
|
24 |
|
typedef struct { |
25 |
+ |
COLOR v; /* hemisphere sample value */ |
26 |
+ |
FVECT p; /* intersection point */ |
27 |
+ |
} AMBSAMP; /* sample value */ |
28 |
+ |
|
29 |
+ |
typedef struct { |
30 |
|
RAY *rp; /* originating ray sample */ |
31 |
|
FVECT ux, uy; /* tangent axis unit vectors */ |
32 |
|
int ns; /* number of samples per axis */ |
33 |
|
COLOR acoef; /* division contribution coefficient */ |
34 |
< |
struct s_ambsamp { |
30 |
< |
COLOR v; /* hemisphere sample value */ |
31 |
< |
FVECT p; /* intersection point */ |
32 |
< |
} sa[1]; /* sample array (extends struct) */ |
34 |
> |
AMBSAMP sa[1]; /* sample array (extends struct) */ |
35 |
|
} AMBHEMI; /* ambient sample hemisphere */ |
34 |
– |
|
35 |
– |
typedef struct s_ambsamp AMBSAMP; |
36 |
|
|
37 |
|
#define ambsam(h,i,j) (h)->sa[(i)*(h)->ns + (j)] |
38 |
|
|