53 |
|
OBJREC *m; |
54 |
|
register RAY *r; |
55 |
|
{ |
56 |
– |
double sqrt(), pow(); |
56 |
|
double cos1, cos2, nratio; |
57 |
|
COLOR mcolor; |
58 |
|
double mabsorp; |
65 |
|
if (m->oargs.nfargs != (m->otype==MAT_DIELECTRIC ? 5 : 8)) |
66 |
|
objerror(m, USER, "bad arguments"); |
67 |
|
|
69 |
– |
r->rt = r->rot; /* just use ray length */ |
70 |
– |
|
68 |
|
raytexture(r, m->omod); /* get modifiers */ |
69 |
|
|
70 |
|
cos1 = raynormal(dnorm, r); /* cosine of theta1 */ |
126 |
|
if (m->otype != MAT_DIELECTRIC |
127 |
|
|| r->rod > 0.0 |
128 |
|
|| r->crtype & SHADOW |
129 |
< |
|| directinvis |
129 |
> |
|| !directvis |
130 |
|
|| m->oargs.farg[4] == 0.0 |
131 |
|
|| !disperse(m, r, p.rdir, trans)) |
132 |
|
#endif |
135 |
|
multcolor(mcolor, r->pcol); /* modify */ |
136 |
|
scalecolor(p.rcol, trans); |
137 |
|
addcolor(r->rcol, p.rcol); |
138 |
+ |
if (nratio >= 1.0-FTINY && nratio <= 1.0+FTINY) |
139 |
+ |
r->rt = r->rot + p.rt; |
140 |
|
} |
141 |
|
} |
142 |
|
} |
167 |
|
FVECT vt; |
168 |
|
double tr; |
169 |
|
{ |
171 |
– |
double sqrt(); |
170 |
|
RAY sray, *entray; |
171 |
|
FVECT v1, v2, n1, n2; |
172 |
|
FVECT dv, v2Xdv; |