45 |
|
extern int hresolu; /* horizontal resolution */ |
46 |
|
extern int vresolu; /* vertical resolution */ |
47 |
|
|
48 |
< |
static int castonly = 0; |
48 |
> |
int castonly = 0; /* only doing ray-casting? */ |
49 |
|
|
50 |
|
#ifndef MAXTSET |
51 |
|
#define MAXTSET 8191 /* maximum number in trace set */ |
69 |
|
oputw, oputW, oputm, oputM, oputtilde; |
70 |
|
|
71 |
|
extern void tranotify(OBJECT obj); |
72 |
– |
static void setoutput(char *vs); |
72 |
|
static int is_fifo(FILE *fp); |
73 |
|
static void bogusray(void); |
74 |
|
static void raycast(RAY *r); |
144 |
|
if (inform != 'a') |
145 |
|
SET_FILE_BINARY(inpfp); |
146 |
|
/* set up output */ |
147 |
< |
if (imm_irrad) |
149 |
< |
castonly = 0; |
150 |
< |
else if (castonly || every_out[0] != NULL) |
147 |
> |
if (castonly || every_out[0] != NULL) |
148 |
|
nproc = 1; /* don't bother multiprocessing */ |
149 |
|
if ((nextflush > 0) & (nproc > nextflush)) { |
150 |
|
error(WARNING, "reducing number of processes to match flush interval"); |
164 |
|
if (nproc > 1) { /* start multiprocessing */ |
165 |
|
ray_popen(nproc); |
166 |
|
ray_fifo_out = printvals; |
167 |
+ |
ray_pnbatch = !nextflush; |
168 |
|
} |
169 |
|
if (hresolu > 0) { |
170 |
|
if (vresolu > 0) |
236 |
|
if (!*vs) |
237 |
|
error(USER, "empty output specification"); |
238 |
|
|
239 |
< |
castonly = 1; |
239 |
> |
castonly = 1; /* sets castonly as side-effect */ |
240 |
|
do |
241 |
|
switch (*vs) { |
242 |
|
case 'T': /* trace sources */ |
286 |
|
case 'V': /* contribution */ |
287 |
|
*table++ = oputV; |
288 |
|
ncomp += 3; |
289 |
+ |
castonly = 0; |
290 |
|
if (ambounce > 0 && (ambacc > FTINY || ambssamp > 0)) |
291 |
|
error(WARNING, |
292 |
|
"-otV accuracy depends on -aa 0 -as 0"); |
354 |
|
if (*every_out != NULL) |
355 |
|
ncomp = 0; |
356 |
|
/* compatibility */ |
357 |
+ |
if ((do_irrad | imm_irrad) && castonly) |
358 |
+ |
error(USER, "-I+ and -i+ options require some value output"); |
359 |
|
for (table = ray_out; *table != NULL; table++) { |
360 |
|
if ((*table == oputV) | (*table == oputW)) |
361 |
|
error(WARNING, "-oVW options require trace mode"); |