| 59 |
|
|
| 60 |
|
typedef void oputf_t(RAY *r); |
| 61 |
|
static oputf_t oputo, oputd, oputv, oputV, oputl, oputL, oputc, oputp, |
| 62 |
< |
oputn, oputN, oputs, oputw, oputW, oputm, oputM, oputtilde; |
| 62 |
> |
oputr, oputR, oputx, oputX, oputn, oputN, oputs, |
| 63 |
> |
oputw, oputW, oputm, oputM, oputtilde; |
| 64 |
|
|
| 65 |
|
static void setoutput(char *vs); |
| 66 |
|
extern void tranotify(OBJECT obj); |
| 73 |
|
static void tabin(RAY *r); |
| 74 |
|
static void ourtrace(RAY *r); |
| 75 |
|
|
| 76 |
< |
static oputf_t *ray_out[16], *every_out[16]; |
| 76 |
> |
static oputf_t *ray_out[32], *every_out[32]; |
| 77 |
|
static putf_t *putreal; |
| 78 |
|
|
| 79 |
|
|
| 237 |
|
case 'd': /* direction */ |
| 238 |
|
*table++ = oputd; |
| 239 |
|
break; |
| 240 |
+ |
case 'r': /* reflected contrib. */ |
| 241 |
+ |
*table++ = oputr; |
| 242 |
+ |
castonly = 0; |
| 243 |
+ |
break; |
| 244 |
+ |
case 'R': /* reflected distance */ |
| 245 |
+ |
*table++ = oputR; |
| 246 |
+ |
castonly = 0; |
| 247 |
+ |
break; |
| 248 |
+ |
case 'x': /* xmit contrib. */ |
| 249 |
+ |
*table++ = oputx; |
| 250 |
+ |
castonly = 0; |
| 251 |
+ |
break; |
| 252 |
+ |
case 'X': /* xmit distance */ |
| 253 |
+ |
*table++ = oputX; |
| 254 |
+ |
castonly = 0; |
| 255 |
+ |
break; |
| 256 |
|
case 'v': /* value */ |
| 257 |
|
*table++ = oputv; |
| 258 |
|
castonly = 0; |
| 259 |
|
break; |
| 260 |
|
case 'V': /* contribution */ |
| 261 |
|
*table++ = oputV; |
| 262 |
+ |
castonly = 0; |
| 263 |
|
if (ambounce > 0 && (ambacc > FTINY || ambssamp > 0)) |
| 264 |
|
error(WARNING, |
| 265 |
|
"-otV accuracy depends on -aa 0 -as 0"); |
| 292 |
|
break; |
| 293 |
|
case 'W': /* coefficient */ |
| 294 |
|
*table++ = oputW; |
| 295 |
+ |
castonly = 0; |
| 296 |
|
if (ambounce > 0 && (ambacc > FTINY || ambssamp > 0)) |
| 297 |
|
error(WARNING, |
| 298 |
|
"-otW accuracy depends on -aa 0 -as 0"); |
| 528 |
|
|
| 529 |
|
|
| 530 |
|
static void |
| 531 |
+ |
oputr( /* print mirrored contribution */ |
| 532 |
+ |
RAY *r |
| 533 |
+ |
) |
| 534 |
+ |
{ |
| 535 |
+ |
RREAL cval[3]; |
| 536 |
+ |
|
| 537 |
+ |
cval[0] = colval(r->mcol,RED); |
| 538 |
+ |
cval[1] = colval(r->mcol,GRN); |
| 539 |
+ |
cval[2] = colval(r->mcol,BLU); |
| 540 |
+ |
(*putreal)(cval, 3); |
| 541 |
+ |
} |
| 542 |
+ |
|
| 543 |
+ |
|
| 544 |
+ |
|
| 545 |
+ |
static void |
| 546 |
+ |
oputR( /* print mirrored distance */ |
| 547 |
+ |
RAY *r |
| 548 |
+ |
) |
| 549 |
+ |
{ |
| 550 |
+ |
(*putreal)(&r->rmt, 1); |
| 551 |
+ |
} |
| 552 |
+ |
|
| 553 |
+ |
|
| 554 |
+ |
static void |
| 555 |
+ |
oputx( /* print unmirrored contribution */ |
| 556 |
+ |
RAY *r |
| 557 |
+ |
) |
| 558 |
+ |
{ |
| 559 |
+ |
RREAL cval[3]; |
| 560 |
+ |
|
| 561 |
+ |
cval[0] = colval(r->rcol,RED) - colval(r->mcol,RED); |
| 562 |
+ |
cval[1] = colval(r->rcol,GRN) - colval(r->mcol,GRN); |
| 563 |
+ |
cval[2] = colval(r->rcol,BLU) - colval(r->mcol,BLU); |
| 564 |
+ |
(*putreal)(cval, 3); |
| 565 |
+ |
} |
| 566 |
+ |
|
| 567 |
+ |
|
| 568 |
+ |
static void |
| 569 |
+ |
oputX( /* print unmirrored distance */ |
| 570 |
+ |
RAY *r |
| 571 |
+ |
) |
| 572 |
+ |
{ |
| 573 |
+ |
(*putreal)(&r->rxt, 1); |
| 574 |
+ |
} |
| 575 |
+ |
|
| 576 |
+ |
|
| 577 |
+ |
static void |
| 578 |
|
oputv( /* print value */ |
| 579 |
|
RAY *r |
| 580 |
|
) |
| 614 |
|
RAY *r |
| 615 |
|
) |
| 616 |
|
{ |
| 617 |
< |
(*putreal)(&r->rt, 1); |
| 617 |
> |
RREAL d = raydistance(r); |
| 618 |
> |
|
| 619 |
> |
(*putreal)(&d, 1); |
| 620 |
|
} |
| 621 |
|
|
| 622 |
|
|