| 322 |
|
register int i; |
| 323 |
|
/* compute cell center */ |
| 324 |
|
cgp[gcp->w>>1] = gcp->w&1 ? hp->grid[gcp->w>>1] : 0 ; |
| 325 |
< |
cgp[((gcp->w>>1)+1)%3] = gcp->i[0] + .5; |
| 326 |
< |
cgp[((gcp->w>>1)+2)%3] = gcp->i[1] + .5; |
| 325 |
> |
cgp[hdwg0[gcp->w]] = gcp->i[0] + .5; |
| 326 |
> |
cgp[hdwg1[gcp->w]] = gcp->i[1] + .5; |
| 327 |
|
hdworld(org, hp, cgp); |
| 328 |
|
/* compute direction to voxel center */ |
| 329 |
|
for (i = 3; i--; ) |
| 350 |
|
for (i = 3; i--; ) |
| 351 |
|
v1[i] = hp->xv[j][i] * d; |
| 352 |
|
d = 0.5/hp->grid[j=(axmax+2)%3]; |
| 353 |
< |
if (DOT(hp->wn[axmax], vc) < 0.) |
| 354 |
< |
d = -d; /* reverse vertex ordering */ |
| 353 |
> |
if (DOT(hp->wg[axmax], vc) < 0.) |
| 354 |
> |
d = -d; /* reverse vertex order */ |
| 355 |
|
for (i = 3; i--; ) |
| 356 |
|
v2[i] = hp->xv[j][i] * d; |
| 357 |
|
/* compute voxel pyramid */ |