70 |
|
d = 1.0/(n*n); |
71 |
|
scalecolor(hp->acoef, d); |
72 |
|
/* make tangent plane axes */ |
73 |
< |
hp->uy[0] = hp->uy[1] = hp->uy[2] = 0; |
73 |
> |
hp->uy[0] = hp->uy[1] = hp->uy[2] = 0.0; |
74 |
|
for (i = 3; i--; ) |
75 |
< |
if ((0.6 < r->ron[i]) & (r->ron[i] < 0.6)) |
76 |
< |
hp->uy[i] = 0.1+frandom(); |
77 |
< |
if (DOT(hp->uy,hp->uy) <= FTINY) |
78 |
< |
error(CONSISTENCY, "bad ray direction in inithemi()"); |
75 |
> |
if ((-0.6 < r->ron[i]) & (r->ron[i] < 0.6)) |
76 |
> |
break; |
77 |
> |
if (i < 0) |
78 |
> |
error(CONSISTENCY, "bad ray direction in inithemi"); |
79 |
> |
hp->uy[i] = 1.0; |
80 |
|
VCROSS(hp->ux, hp->uy, r->ron); |
81 |
|
normalize(hp->ux); |
82 |
|
VCROSS(hp->uy, r->ron, hp->ux); |