50 |
|
return(-2-i); /* found it! */ |
51 |
|
/* else tack on new entry */ |
52 |
|
if (ssf_count >= ssf_max) { /* need more space? */ |
53 |
– |
fprintf(stderr, "DEBUG: skip flag array > %d entries (%.2f MBytes)\n", |
54 |
– |
ssf_count, SSKIPFLSIZ/1024./1024.*ssf_count); |
53 |
|
ssf_max = ssf_count + (ssf_count>>2) + 64; |
54 |
|
if (ssf_max <= ssf_count && |
55 |
|
(ssf_max = ssf_count+1024) <= ssf_count) |
97 |
|
|
98 |
|
if (sp->sflags & SSKIP) |
99 |
|
return(1); |
100 |
< |
#ifdef SSKIPOPT |
101 |
< |
if (r->rsrc < -1 && /* ray has custom skip flags? */ |
102 |
< |
sskip_chk(sskip_flags(r->rsrc), sn)) |
100 |
> |
#ifdef SSKIPOPT /* parent ray has custom skip flags? */ |
101 |
> |
if (r->parent != NULL && r->parent->rsrc < -1 && |
102 |
> |
sskip_chk(sskip_flags(r->parent->rsrc), sn)) |
103 |
|
return(1); |
104 |
|
#endif |
105 |
< |
if ((sp->sflags & (SPROX|SDISTANT)) != SPROX) |
106 |
< |
return(0); |
109 |
< |
|
110 |
< |
return(dist2(r->rorg, sp->sloc) > |
105 |
> |
if ((sp->sflags & (SPROX|SDISTANT)) == SPROX) |
106 |
> |
return(dist2(r->rorg, sp->sloc) > |
107 |
|
(sp->sl.prox + sp->srad)*(sp->sl.prox + sp->srad)); |
108 |
+ |
return(0); |
109 |
|
} |
110 |
|
|
111 |
|
double |