| 208 |
|
if (single_plane_incident) { /* isotropic BSDF? */ |
| 209 |
|
RBFNODE *rbf; /* find edge we're on */ |
| 210 |
|
for (rbf = dsf_list; rbf != NULL; rbf = rbf->next) { |
| 211 |
< |
if (input_orient*rbf->invec[2] < input_orient*invec[2]) |
| 211 |
> |
if (input_orient*rbf->invec[2] < input_orient*invec[2]-FTINY) |
| 212 |
|
break; |
| 213 |
|
if (rbf->next != NULL && input_orient*rbf->next->invec[2] < |
| 214 |
< |
input_orient*invec[2]) { |
| 214 |
> |
input_orient*invec[2]+FTINY) { |
| 215 |
|
for (miga[0] = rbf->ejl; miga[0] != NULL; |
| 216 |
|
miga[0] = nextedge(rbf,miga[0])) |
| 217 |
|
if (opp_rbf(rbf,miga[0]) == rbf->next) { |
| 348 |
|
return(NULL); /* pro forma return */ |
| 349 |
|
} |
| 350 |
|
|
| 351 |
< |
/* Partially advect between recorded incident angles and allocate new RBF */ |
| 351 |
> |
/* Advect between recorded incident angles and allocate new RBF */ |
| 352 |
|
RBFNODE * |
| 353 |
|
advect_rbf(const FVECT invec, int lobe_lim) |
| 354 |
|
{ |
| 375 |
|
return(rbf); |
| 376 |
|
} |
| 377 |
|
#ifdef DEBUG |
| 378 |
< |
if (miga[0]->rbfv[0] != miga[2]->rbfv[0] | |
| 379 |
< |
miga[0]->rbfv[1] != miga[1]->rbfv[0] | |
| 380 |
< |
miga[1]->rbfv[1] != miga[2]->rbfv[1]) { |
| 378 |
> |
if ((miga[0]->rbfv[0] != miga[2]->rbfv[0]) | |
| 379 |
> |
(miga[0]->rbfv[1] != miga[1]->rbfv[0]) | |
| 380 |
> |
(miga[1]->rbfv[1] != miga[2]->rbfv[1])) { |
| 381 |
|
fprintf(stderr, "%s: Triangle vertex screw-up!\n", progname); |
| 382 |
|
exit(1); |
| 383 |
|
} |