| 30 |
|
|
| 31 |
|
static void |
| 32 |
|
initeyelim( /* initialize grid coordinate limits */ |
| 33 |
< |
register struct gclim *gcl, |
| 34 |
< |
register HOLO *hp, |
| 33 |
> |
struct gclim *gcl, |
| 34 |
> |
HOLO *hp, |
| 35 |
|
GCOORD *gc |
| 36 |
|
) |
| 37 |
|
{ |
| 38 |
< |
register RREAL *v; |
| 39 |
< |
register int i; |
| 38 |
> |
RREAL *v; |
| 39 |
> |
int i; |
| 40 |
|
|
| 41 |
|
if (hp != NULL) { |
| 42 |
|
hdgrid(gcl->egp, gcl->hp = hp, myeye.vpt); |
| 54 |
|
|
| 55 |
|
static void |
| 56 |
|
groweyelim( /* grow grid limits about eye point */ |
| 57 |
< |
register struct gclim *gcl, |
| 57 |
> |
struct gclim *gcl, |
| 58 |
|
GCOORD *gc, |
| 59 |
|
double r0, |
| 60 |
|
double r1, |
| 107 |
|
f = wallpos*(wallpos*sqcoef[gw] + licoef[gw]) + cnst; |
| 108 |
|
for (i = 0; i < 2; i++) { |
| 109 |
|
if (i) { /* swap x and y coefficients */ |
| 110 |
< |
register double t; |
| 110 |
> |
double t; |
| 111 |
|
t = a; a = c; c = t; |
| 112 |
|
t = d; d = e; e = t; |
| 113 |
|
} |
| 156 |
|
|
| 157 |
|
static int |
| 158 |
|
clipeyelim( /* clip eye limits to grid cell */ |
| 159 |
< |
register short rrng[2][2], |
| 160 |
< |
register struct gclim *gcl |
| 159 |
> |
short rrng[2][2], |
| 160 |
> |
struct gclim *gcl |
| 161 |
|
) |
| 162 |
|
{ |
| 163 |
|
int incell = 1; |
| 164 |
< |
register int i; |
| 164 |
> |
int i; |
| 165 |
|
|
| 166 |
|
for (i = 0; i < 2; i++) { |
| 167 |
|
if (gcl->gmin[i] < gcl->gc.i[i]) |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
|
| 184 |
< |
extern void |
| 184 |
> |
void |
| 185 |
|
packrays( /* pack ray origins and directions */ |
| 186 |
< |
register float *rod, |
| 187 |
< |
register PACKET *p |
| 186 |
> |
float *rod, |
| 187 |
> |
PACKET *p |
| 188 |
|
) |
| 189 |
|
{ |
| 190 |
|
#if 0 |
| 198 |
|
GCOORD gc[2]; |
| 199 |
|
FVECT ro, rd; |
| 200 |
|
double d; |
| 201 |
< |
register int i; |
| 201 |
> |
int i; |
| 202 |
|
|
| 203 |
|
if (!hdbcoord(gc, hdlist[p->hd], p->bi)) |
| 204 |
|
error(CONSISTENCY, "bad beam index in packrays"); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
|
| 268 |
< |
extern void |
| 268 |
> |
void |
| 269 |
|
donerays( /* encode finished ray computations */ |
| 270 |
< |
register PACKET *p, |
| 271 |
< |
register float *rvl |
| 270 |
> |
PACKET *p, |
| 271 |
> |
float *rvl |
| 272 |
|
) |
| 273 |
|
{ |
| 274 |
|
double d; |
| 275 |
< |
register int i; |
| 275 |
> |
int i; |
| 276 |
|
|
| 277 |
|
for (i = 0; i < p->nr; i++) { |
| 278 |
|
setcolr(p->ra[i].v, rvl[0], rvl[1], rvl[2]); |
| 286 |
|
} |
| 287 |
|
|
| 288 |
|
|
| 289 |
< |
extern int |
| 289 |
> |
int |
| 290 |
|
done_rtrace(void) /* clean up and close rtrace calculation */ |
| 291 |
|
{ |
| 292 |
|
int status; |
| 308 |
|
} |
| 309 |
|
|
| 310 |
|
|
| 311 |
< |
extern void |
| 311 |
> |
void |
| 312 |
|
new_rtrace(void) /* restart rtrace calculation */ |
| 313 |
|
{ |
| 314 |
|
char combuf[128]; |
| 333 |
|
} |
| 334 |
|
|
| 335 |
|
|
| 336 |
< |
extern int |
| 336 |
> |
int |
| 337 |
|
getradfile(void) /* run rad and get needed variables */ |
| 338 |
|
{ |
| 339 |
|
static short mvar[] = {OCTREE,EYESEP,-1}; |
| 341 |
|
char tf2[64]; |
| 342 |
|
char combuf[256]; |
| 343 |
|
char *pippt = NULL; |
| 344 |
< |
register int i; |
| 345 |
< |
register char *cp; |
| 344 |
> |
int i; |
| 345 |
> |
char *cp; |
| 346 |
|
/* check if rad file specified */ |
| 347 |
|
if (!vdef(RIF)) |
| 348 |
|
return(0); |
| 376 |
|
loadvars(tf2); /* load variables */ |
| 377 |
|
unlink(tf2); |
| 378 |
|
} |
| 379 |
< |
rtargc += wordfile(rtargv+rtargc, tf1); /* get rtrace options */ |
| 379 |
> |
/* get rtrace options */ |
| 380 |
> |
rtargc += wordfile(rtargv+rtargc, MAXRTARGC-rtargc, tf1); |
| 381 |
|
unlink(tf1); /* clean up */ |
| 382 |
|
return(1); |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
|
| 386 |
< |
extern void |
| 386 |
> |
void |
| 387 |
|
report( /* report progress so far */ |
| 388 |
|
time_t t |
| 389 |
|
) |