375 |
|
axmax = -1; avmax = 0; |
376 |
|
for (i = 3; i--; ) { |
377 |
|
d = vgp[i] - cgp[i]; |
378 |
< |
if (d < 0) d = -d; |
378 |
> |
if (d < 0.) d = -d; |
379 |
|
if (d > avmax) { |
380 |
|
avmax = d; |
381 |
|
axmax = i; |
382 |
|
} |
383 |
|
} |
384 |
|
#ifdef DEBUG |
385 |
< |
if (axmax < 0) |
385 |
> |
if (axmax < 0.) |
386 |
|
error(CONSISTENCY, "botched axis computation in docell"); |
387 |
|
#endif |
388 |
|
/* compute offset vectors */ |
390 |
|
for (i = 3; i--; ) |
391 |
|
v1[i] = hp->xv[j][i] * d; |
392 |
|
d = 0.5/hp->grid[j=(axmax+2)%3]; |
393 |
< |
if (DOT(hp->wn[axmax], vc) < 0) |
393 |
> |
if (DOT(hp->wn[axmax], vc) < 0.) |
394 |
|
d = -d; /* reverse vertex ordering */ |
395 |
|
for (i = 3; i--; ) |
396 |
|
v2[i] = hp->xv[j][i] * d; |
469 |
|
} |
470 |
|
|
471 |
|
|
472 |
+ |
int |
473 |
|
beam_sync() /* synchronize beams on server */ |
474 |
|
{ |
475 |
|
cbeamop(DR_NEWSET, cbeam, ncbeams, &odev.v, odev.hres, odev.vres); |
476 |
+ |
return(ncbeams); |
477 |
|
} |
478 |
|
|
479 |
|
|
484 |
|
VOXL vlnew[8]; |
485 |
|
int n, comn; |
486 |
|
|
487 |
< |
if (!vn->type) { /* clear our beam list */ |
487 |
> |
if (vn == NULL || !vn->type) { /* clear our beam list */ |
488 |
|
set_voxels(vlnew, 0); |
489 |
|
cbeamop(DR_DELSET, cbeam, ncbeams, NULL, 0, 0); |
490 |
|
ncbeams = 0; |
491 |
< |
copystruct(&dvw, vn); |
491 |
> |
dvw.type = 0; |
492 |
|
return(1); |
493 |
|
} |
494 |
|
/* find our new voxels */ |