24 |
|
printf(" i\t\t\t\t Report general information (metadata)\n"); |
25 |
|
printf(" c\t\t\t\t Report diffuse and specular components\n"); |
26 |
|
printf(" q theta_i phi_i theta_o phi_o\t Query BSDF for given path (CIE-XYZ)\n"); |
27 |
< |
printf(" s[r|t][s|d] N theta phi\t\t\t Generate N ray directions & colors at given incidence\n"); |
28 |
< |
printf(" h[s|d] theta phi\t\t\t Report hemispherical scatteromg at given incidence\n"); |
29 |
< |
printf(" r[s|d] theta phi\t\t\t Report hemispherical reflection at given incidence\n"); |
30 |
< |
printf(" t[s|d] theta phi\t\t\t Report hemispherical transmission at given incidence\n"); |
27 |
> |
printf(" s[r|t][s|d] N theta phi\t Generate N ray directions & colors at given incidence\n"); |
28 |
> |
printf(" h[s|d] theta phi\t\t Report hemispherical scattering at given incidence\n"); |
29 |
> |
printf(" r[s|d] theta phi\t\t Report hemispherical reflection at given incidence\n"); |
30 |
> |
printf(" t[s|d] theta phi\t\t Report hemispherical transmission at given incidence\n"); |
31 |
|
printf(" a theta phi [t2 p2]\t\t Report resolution (in proj. steradians) for given direction(s)\n"); |
32 |
|
printf(" ^D\t\t\t\t Quit program\n"); |
33 |
|
} |
47 |
|
static void |
48 |
|
printXYZ(const char *intro, const SDValue *vp) |
49 |
|
{ |
50 |
+ |
if (vp->cieY <= 1e-9) { |
51 |
+ |
printf("%s0 0 0\n", intro); |
52 |
+ |
return; |
53 |
+ |
} |
54 |
|
printf("%s%.3e %.3e %.3e\n", intro, |
55 |
|
vp->spec.cx/vp->spec.cy*vp->cieY, |
56 |
|
vp->cieY, |