| 99 |
|
|
| 100 |
|
/* rtrace command and defaults */ |
| 101 |
|
char *rtargv[256+2*MAXMODLIST] = { "rtrace", |
| 102 |
< |
"-dj", ".5", "-dr", "3", |
| 102 |
> |
"-dj", ".9", "-dr", "3", |
| 103 |
|
"-ab", "1", "-ad", "350", }; |
| 104 |
|
|
| 105 |
|
int rtargc = 9; |
| 246 |
|
while ((j = expandarg(&argc, &argv, i)) > 0) |
| 247 |
|
; |
| 248 |
|
if (j < 0) { |
| 249 |
< |
fprintf(stderr, "%s: cannot expand '%s'", |
| 249 |
> |
fprintf(stderr, "%s: cannot expand '%s'\n", |
| 250 |
|
argv[0], argv[i]); |
| 251 |
|
exit(1); |
| 252 |
|
} |
| 1148 |
|
"dummy ray(s) ignored during accumulation\n"); |
| 1149 |
|
continue; |
| 1150 |
|
} |
| 1151 |
< |
if (!iblen || /* need reset? */ |
| 1151 |
> |
if (!iblen || /* need flush/reset? */ |
| 1152 |
|
queue_length() > 10*nrtprocs() || |
| 1153 |
|
lastray+1 < lastray) { |
| 1154 |
|
while (wait_rproc() != NULL) |
| 1161 |
|
if (iblen) { /* trace ray if valid */ |
| 1162 |
|
writebuf(rtp->pd.w, inpbuf, iblen); |
| 1163 |
|
} else { /* else bypass dummy ray */ |
| 1164 |
< |
queue_raytree(rtp); /* empty tree */ |
| 1165 |
< |
if ((yres <= 0) | (waitflush > 1)) |
| 1166 |
< |
waitflush = 1; /* flush after this */ |
| 1164 |
> |
queue_raytree(rtp); /* queue empty ray/record */ |
| 1165 |
> |
if ((yres <= 0) | (xres <= 0)) |
| 1166 |
> |
waitflush = 1; /* flush right after */ |
| 1167 |
|
} |
| 1168 |
|
process_queue(); /* catch up with results */ |
| 1169 |
|
if (raysleft && !--raysleft) |
| 1218 |
|
STREAMOUT *sop = (STREAMOUT *)e->data; |
| 1219 |
|
|
| 1220 |
|
if (sop->ofp == NULL) |
| 1221 |
< |
return; |
| 1221 |
> |
return(0); |
| 1222 |
|
fclose(sop->ofp); |
| 1223 |
|
sop->ofp = NULL; |
| 1224 |
+ |
return(0); |
| 1225 |
|
} |
| 1226 |
|
|
| 1227 |
|
/* load previously accumulated values */ |