71 |
|
|
72 |
|
RayReportCall printvals; /* print selected ray values */ |
73 |
|
|
74 |
< |
void putscolor(COLORV *scol); /* convert/print spectral color */ |
74 |
> |
void putscolor(COLORV *scol, double sf = 1.); /* convert/print spectral color */ |
75 |
|
|
76 |
|
static oputf_t *ray_out[32], *every_out[32]; |
77 |
|
|
413 |
|
return(ncomp); |
414 |
|
} |
415 |
|
|
416 |
< |
static int |
416 |
> |
int |
417 |
|
printvals( /* print requested ray values */ |
418 |
|
RAY *r, void *cd |
419 |
|
) |
511 |
|
RAY *r |
512 |
|
) |
513 |
|
{ |
514 |
< |
putscolor(r->mcol); |
514 |
> |
putscolor(r->mcol, out_scalefactor); |
515 |
|
} |
516 |
|
|
517 |
|
static void |
532 |
|
copyscolor(cdiff, r->rcol); |
533 |
|
sopscolor(cdiff, -=, r->mcol); |
534 |
|
|
535 |
< |
putscolor(cdiff); |
535 |
> |
putscolor(cdiff, out_scalefactor); |
536 |
|
} |
537 |
|
|
538 |
|
static void |
548 |
|
RAY *r |
549 |
|
) |
550 |
|
{ |
551 |
< |
putscolor(r->rcol); |
551 |
> |
putscolor(r->rcol, out_scalefactor); |
552 |
|
} |
553 |
|
|
554 |
|
static void |
560 |
|
|
561 |
|
raycontrib(contr, r, PRIMARY); |
562 |
|
smultscolor(contr, r->rcol); |
563 |
< |
putscolor(contr); |
563 |
> |
putscolor(contr, out_scalefactor); |
564 |
|
} |
565 |
|
|
566 |
|
static void |
768 |
|
putbinary(cout, sizeof(cout), 1, stdout); |
769 |
|
} |
770 |
|
|
771 |
< |
static void |
772 |
< |
putscolor(COLORV *scol) /* output (spectral) color */ |
771 |
> |
void |
772 |
> |
putscolor(COLORV *scol, double sf) /* output (spectral) color */ |
773 |
|
{ |
774 |
|
static COLORMAT xyz2myrgbmat; |
775 |
|
SCOLOR my_scol; |
776 |
|
COLOR col; |
777 |
|
/* single channel output? */ |
778 |
|
if (sens_curve != NULL) { |
779 |
< |
RREAL v = (*sens_curve)(scol) * out_scalefactor; |
779 |
> |
RREAL v = (*sens_curve)(scol) * sf; |
780 |
|
(*putreal)(&v, 1); |
781 |
|
return; |
782 |
|
} |
783 |
< |
if (out_scalefactor != 1.) { /* apply scalefactor if any */ |
783 |
> |
if (sf != 1.) { /* apply scalefactor if any */ |
784 |
|
copyscolor(my_scol, scol); |
785 |
< |
scalescolor(my_scol, out_scalefactor); |
785 |
> |
scalescolor(my_scol, sf); |
786 |
|
scol = my_scol; |
787 |
|
} |
788 |
|
if (out_prims == NULL) { /* full spectral reporting */ |