| 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, |
| 108 |
|
printf("Manufacturer: '%s'\n", bsdf->makr); |
| 109 |
|
printf("Width, Height, Thickness (m): %.4e, %.4e, %.4e\n", |
| 110 |
|
bsdf->dim[0], bsdf->dim[1], bsdf->dim[2]); |
| 111 |
< |
printf("Has geometry: %s\n", bsdf->mgf ? "yes" : "no"); |
| 111 |
> |
if (bsdf->mgf) |
| 112 |
> |
printf("Has geometry: %lu bytes\n", |
| 113 |
> |
(unsigned long)strlen(bsdf->mgf)); |
| 114 |
> |
else |
| 115 |
> |
printf("Has geometry: no\n"); |
| 116 |
|
continue; |
| 117 |
|
case 'C': /* report constant values */ |
| 118 |
|
if (!bsdf) |
| 199 |
|
vec_from_deg(vin, atof(sskip2(cp,1)), atof(sskip2(cp,2))); |
| 200 |
|
if (*sskip2(cp,4)) { |
| 201 |
|
vec_from_deg(vout, atof(sskip2(cp,3)), atof(sskip2(cp,4))); |
| 202 |
< |
if (SDreportError(SDsizeBSDF(proja, vin, vout, |
| 202 |
> |
if (SDreportError(SDsizeBSDF(proja, vout, vin, |
| 203 |
|
SDqueryMin+SDqueryMax, bsdf), stderr)) |
| 204 |
|
continue; |
| 205 |
|
} else if (SDreportError(SDsizeBSDF(proja, vin, NULL, |