22 |
|
#define OCTSCALE 1.0 /* ceil((valid rad.)/(cube size)) */ |
23 |
|
#endif |
24 |
|
|
25 |
– |
extern char *shm_boundary; /* memory sharing boundary */ |
26 |
– |
|
25 |
|
#ifndef MAXASET |
26 |
|
#define MAXASET 4095 /* maximum number of elements in ambient set */ |
27 |
|
#endif |
46 |
|
|
47 |
|
#define newambval() (AMBVAL *)malloc(sizeof(AMBVAL)) |
48 |
|
|
49 |
< |
#define tfunc(lwr, x, upr) (((x)-(lwr))/((upr)-(lwr))) |
49 |
> |
#define tfunc(x0, x, x1) (((x)-(x0))/((x1)-(x0))) |
50 |
|
|
51 |
|
static void initambfile(int creat); |
52 |
|
static void avsave(AMBVAL *av); |
424 |
|
at->kid+i, ck0, s); |
425 |
|
} |
426 |
|
/* good enough? */ |
427 |
< |
if (wsum >= 0.05 && s > minarad*10.0) |
427 |
> |
if ((wsum >= 0.05) & (s*ambacc > minarad)) |
428 |
|
return(wsum); |
429 |
|
} |
430 |
|
/* adjust maximum angle */ |
456 |
|
*/ |
457 |
|
VSUB(ck0, r->rop, av->pos); |
458 |
|
d = DOT(ck0, uvw[2]); |
459 |
< |
if (d < -minarad*ambacc-.001) |
459 |
> |
if (d < -minarad*ambacc) |
460 |
|
continue; |
461 |
|
d /= av->rad[0]; |
462 |
|
delta_t2 = d*d; |
639 |
|
ambvwt, ambounce, ambacc); |
640 |
|
fprintf(ambfp, "-ad %d -as %d -ar %d ", |
641 |
|
ambdiv, ambssamp, ambres); |
642 |
+ |
fprintf(ambfp, "-dr %d -ds %g -dt %g -dc %g ", directrelay, |
643 |
+ |
srcsizerat, shadthresh, shadcert); |
644 |
+ |
fprintf(ambfp, "-ss %g -st %g -lr %d -lw %g ", specjitter, |
645 |
+ |
specthresh, maxdepth, minweight); |
646 |
|
if (octname != NULL) |
647 |
|
fputs(octname, ambfp); |
648 |
|
fputc('\n', ambfp); |