| 29 |
|
|
| 30 |
|
static struct beamcomp { |
| 31 |
|
int hd; /* holodeck section number */ |
| 32 |
< |
int4 bi; /* beam index */ |
| 32 |
> |
int bi; /* beam index */ |
| 33 |
|
int4 nr; /* number of samples desired */ |
| 34 |
|
} *cbeam = NULL; /* current beam list */ |
| 35 |
|
|
| 307 |
|
} |
| 308 |
|
} |
| 309 |
|
#ifdef DEBUG |
| 310 |
< |
if (axmax < 0.) |
| 310 |
> |
if (axmax < 0) |
| 311 |
|
error(CONSISTENCY, "botched axis computation in docell"); |
| 312 |
|
#endif |
| 313 |
|
/* compute offset vectors */ |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
|
| 352 |
< |
beam_init() /* clear beam list for new view(s) */ |
| 352 |
> |
beam_init(fresh) /* clear beam list for new view(s) */ |
| 353 |
> |
int fresh; |
| 354 |
|
{ |
| 355 |
|
register int i; |
| 356 |
< |
/* clear desire flags */ |
| 357 |
< |
for (i = ncbeams+xcbeams; i--; ) |
| 358 |
< |
cbeam[i].nr = 0; |
| 356 |
> |
|
| 357 |
> |
if (fresh) /* discard old beams? */ |
| 358 |
> |
ncbeams = xcbeams = 0; |
| 359 |
> |
else /* else clear sample requests */ |
| 360 |
> |
for (i = ncbeams+xcbeams; i--; ) |
| 361 |
> |
cbeam[i].nr = 0; |
| 362 |
|
voxel[0].hd = -1; /* clear voxel list */ |
| 363 |
|
} |
| 364 |
|
|
| 388 |
|
beam_sync(all) /* update beam list on server */ |
| 389 |
|
int all; |
| 390 |
|
{ |
| 391 |
< |
/* sort list to put orphans at end */ |
| 392 |
< |
cbeamsort(0); |
| 391 |
> |
/* sort list (put orphans at end) */ |
| 392 |
> |
cbeamsort(all < 0); |
| 393 |
|
if (all) |
| 394 |
|
cbeamop(DR_NEWSET, cbeam, ncbeams); |
| 395 |
|
else |