| 1 |
< |
/* Copyright (c) 1994 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1995 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 61 |
|
r->rlvl++; |
| 62 |
|
r->rsrc = -1; |
| 63 |
|
r->clipset = ro->clipset; |
| 64 |
+ |
r->rmax = 0.0; |
| 65 |
|
} else { |
| 66 |
|
r->rsrc = ro->rsrc; |
| 67 |
|
r->clipset = ro->newcset; |
| 68 |
+ |
r->rmax = ro->rmax <= FTINY ? 0.0 : ro->rmax - ro->rot; |
| 69 |
|
} |
| 70 |
|
r->revf = ro->revf; |
| 71 |
|
r->rweight = ro->rweight * rw; |
| 72 |
|
r->crtype = ro->crtype | (r->rtype = rt); |
| 73 |
|
VCOPY(r->rorg, ro->rop); |
| 72 |
– |
r->rmax = 0.0; |
| 74 |
|
} |
| 75 |
|
rayclear(r); |
| 76 |
|
return(r->rlvl <= maxdepth && r->rweight >= minweight ? 0 : -1); |
| 132 |
|
|
| 133 |
|
if (rayorigin(&tr, r, TRANS, 1.0) == 0) { |
| 134 |
|
VCOPY(tr.rdir, r->rdir); |
| 134 |
– |
if (r->rmax > FTINY) |
| 135 |
– |
tr.rmax = r->rmax - r->rot; |
| 135 |
|
rayvalue(&tr); |
| 136 |
|
copycolor(r->rcol, tr.rcol); |
| 137 |
|
r->rt = r->rot + tr.rt; |
| 194 |
|
error(USER, errmsg); |
| 195 |
|
} |
| 196 |
|
******/ |
| 197 |
< |
if ((*ofun[m->otype].funp)(m, r)) |
| 198 |
< |
objerror(r->ro, USER, "conflicting materials"); |
| 197 |
> |
if ((*ofun[m->otype].funp)(m, r)) { |
| 198 |
> |
sprintf(errmsg, "conflicting material \"%s\"", |
| 199 |
> |
m->oname); |
| 200 |
> |
objerror(r->ro, USER, errmsg); |
| 201 |
> |
} |
| 202 |
|
} |
| 203 |
|
depth--; /* end here */ |
| 204 |
|
} |
| 259 |
|
|
| 260 |
|
|
| 261 |
|
double |
| 262 |
+ |
raydist(r, flags) /* compute (cumulative) ray distance */ |
| 263 |
+ |
register RAY *r; |
| 264 |
+ |
register int flags; |
| 265 |
+ |
{ |
| 266 |
+ |
double sum = 0.0; |
| 267 |
+ |
|
| 268 |
+ |
while (r != NULL && r->crtype&flags) { |
| 269 |
+ |
sum += r->rot; |
| 270 |
+ |
r = r->parent; |
| 271 |
+ |
} |
| 272 |
+ |
return(sum); |
| 273 |
+ |
} |
| 274 |
+ |
|
| 275 |
+ |
|
| 276 |
+ |
double |
| 277 |
|
raynormal(norm, r) /* compute perturbed normal for ray */ |
| 278 |
|
FVECT norm; |
| 279 |
|
register RAY *r; |
| 413 |
|
return(0); |
| 414 |
|
} |
| 415 |
|
cxset[0] = 0; |
| 416 |
< |
return(raymove(curpos, cxset, sflags, r, scene) == RAYHIT && |
| 417 |
< |
r->ro != &Aftplane); |
| 416 |
> |
raymove(curpos, cxset, sflags, r, scene); |
| 417 |
> |
return(r->ro != NULL & r->ro != &Aftplane); |
| 418 |
|
} |
| 419 |
|
|
| 420 |
|
|