50 |
|
r->crtype = r->rtype = rt; |
51 |
|
r->rsrc = -1; |
52 |
|
r->clipset = NULL; |
53 |
– |
r->revf = raytrace; |
53 |
|
copycolor(r->cext, cextinction); |
54 |
|
copycolor(r->albedo, salbedo); |
55 |
|
r->gecc = seccg; |
69 |
|
r->clipset = ro->newcset; |
70 |
|
r->rmax = ro->rmax <= FTINY ? 0.0 : ro->rmax - ro->rot; |
71 |
|
} |
73 |
– |
r->revf = ro->revf; |
72 |
|
copycolor(r->cext, ro->cext); |
73 |
|
copycolor(r->albedo, ro->albedo); |
74 |
|
r->gecc = ro->gecc; |
108 |
|
|
109 |
|
|
110 |
|
extern void |
111 |
< |
raytrace( /* trace a ray and compute its value */ |
111 |
> |
rayvalue( /* trace a ray and compute its value */ |
112 |
|
RAY *r |
113 |
|
) |
114 |
|
{ |
160 |
|
int mod |
161 |
|
) |
162 |
|
{ |
165 |
– |
int gotmat; |
163 |
|
register OBJREC *m; |
164 |
+ |
|
165 |
|
r->rt = r->rot; /* set effective ray length */ |
166 |
< |
for (gotmat = 0; !gotmat && mod != OVOID; mod = m->omod) { |
166 |
> |
for ( ; mod != OVOID; mod = m->omod) { |
167 |
|
m = objptr(mod); |
168 |
|
/****** unnecessary test since modifier() is always called |
169 |
|
if (!ismodifier(m->otype)) { |
182 |
|
if (!islight(m->otype)) |
183 |
|
m = &Lamb; |
184 |
|
} |
185 |
< |
/* materials call raytexture */ |
186 |
< |
gotmat = (*ofun[m->otype].funp)(m, r); |
185 |
> |
if ((*ofun[m->otype].funp)(m, r)) |
186 |
> |
return(1); /* materials call raytexture() */ |
187 |
|
} |
188 |
< |
return(gotmat); |
188 |
> |
return(0); /* no material! */ |
189 |
|
} |
190 |
|
|
191 |
|
|