249 |
|
if (!strcasecmp(unit, "Foot")) return(.3048); |
250 |
|
if (!strcasecmp(unit, "Inch")) return(.0254); |
251 |
|
if (!strcasecmp(unit, "Centimeter")) return(.01); |
252 |
+ |
if (!strcasecmp(unit, "Millimeter")) return(.001); |
253 |
|
sprintf(errmsg, "unknown dimensional unit '%s'", unit); |
254 |
|
error(USER, errmsg); |
255 |
|
} |
446 |
|
BSDF_value(dp,i,o) = .0f; |
447 |
|
} |
448 |
|
} |
449 |
< |
if (hemi_total > 1.02) { |
449 |
> |
if (hemi_total > 1.01) { |
450 |
|
sprintf(errmsg, |
451 |
|
"incoming BSDF direction %d passes %.1f%% of light", |
452 |
|
i, 100.*hemi_total); |
463 |
|
for (i = dp->ninc; i--; ) |
464 |
|
hemi_total += BSDF_value(dp,i,o) * omega_iarr[i]; |
465 |
|
|
466 |
< |
if (hemi_total > 1.02) { |
466 |
> |
if (hemi_total > 1.01) { |
467 |
|
sprintf(errmsg, |
468 |
|
"outgoing BSDF direction %d collects %.1f%% of light", |
469 |
|
o, 100.*hemi_total); |
472 |
|
full_total += hemi_total*omega_oarr[o]; |
473 |
|
} |
474 |
|
full_total /= PI; |
475 |
< |
if (full_total > 1.02) { |
476 |
< |
sprintf(errmsg, "BSDF transfers %.1f%% of light", |
475 |
> |
if (full_total > 1.00001) { |
476 |
> |
sprintf(errmsg, "BSDF transfers %.4f%% of light", |
477 |
|
100.*full_total); |
478 |
|
error(WARNING, errmsg); |
479 |
|
} |