146 |
|
case 'f': putreal = putf; break; |
147 |
|
case 'd': putreal = putd; break; |
148 |
|
case 'c': |
149 |
< |
if (outvals[0] && (outvals[1] || !strchr("vVWrx", outvals[0]))) |
150 |
< |
error(USER, "color format only with one of 'vVWrx'"); |
149 |
> |
if (outvals[0] && (outvals[1] || !strchr("vrx", outvals[0]))) |
150 |
> |
error(USER, "color format only with -ov, -or, -ox"); |
151 |
|
putreal = putrgbe; break; |
152 |
|
default: |
153 |
|
error(CONSISTENCY, "botched output format"); |
267 |
|
break; |
268 |
|
case 'V': /* contribution */ |
269 |
|
*table++ = oputV; |
270 |
– |
castonly = 0; |
270 |
|
if (ambounce > 0 && (ambacc > FTINY || ambssamp > 0)) |
271 |
|
error(WARNING, |
272 |
|
"-otV accuracy depends on -aa 0 -as 0"); |
315 |
|
break; |
316 |
|
} |
317 |
|
*table = NULL; |
318 |
< |
if (do_irrad | imm_irrad) /* compatibile? */ |
319 |
< |
for (table = ray_out; *table != NULL; table++) |
320 |
< |
if ((*table == oputr) | (*table == oputR) | |
321 |
< |
(*table == oputx) | (*table == oputX)) { |
322 |
< |
error(WARNING, "-orRxX options incompatible with -I+ and -i+"); |
323 |
< |
break; |
324 |
< |
} |
318 |
> |
/* compatibility */ |
319 |
> |
for (table = ray_out; *table != NULL; table++) { |
320 |
> |
if ((*table == oputV) | (*table == oputW)) |
321 |
> |
error(WARNING, "-oVW options require trace mode"); |
322 |
> |
if ((do_irrad | imm_irrad) && |
323 |
> |
(*table == oputr) | (*table == oputR) | |
324 |
> |
(*table == oputx) | (*table == oputX)) |
325 |
> |
error(WARNING, "-orRxX options incompatible with -I+ and -i+"); |
326 |
> |
} |
327 |
|
} |
328 |
|
|
329 |
|
|
663 |
|
RAY *r |
664 |
|
) |
665 |
|
{ |
666 |
< |
if (r->rot < FHUGE) |
667 |
< |
(*putreal)(r->ron, 3); |
668 |
< |
else |
666 |
> |
if (r->rot < FHUGE) { |
667 |
> |
if (r->rflips & 1) { /* undo any flippin' flips */ |
668 |
> |
FVECT unrm; |
669 |
> |
unrm[0] = -r->ron[0]; |
670 |
> |
unrm[1] = -r->ron[1]; |
671 |
> |
unrm[2] = -r->ron[2]; |
672 |
> |
(*putreal)(unrm, 3); |
673 |
> |
} else |
674 |
> |
(*putreal)(r->ron, 3); |
675 |
> |
} else |
676 |
|
(*putreal)(vdummy, 3); |
677 |
|
} |
678 |
|
|