1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1994 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
85 |
|
nsdir[j] = sp->sloc[j] - r->rop[j]; |
86 |
|
normalize(nsdir); |
87 |
|
} |
88 |
< |
if (r->rox != NULL) |
89 |
< |
multv3(nsdir, nsdir, r->rox->b.xfm); |
90 |
< |
if (mf->b != &unitxf) |
91 |
< |
multv3(nsdir, nsdir, mf->b->xfm); |
92 |
< |
} else |
93 |
< |
nsdir[0] = nsdir[1] = nsdir[2] = 0.0; |
94 |
< |
varset("DxA", '=', nsdir[0]); |
95 |
< |
varset("DyA", '=', nsdir[1]); |
96 |
< |
varset("DzA", '=', nsdir[2]); |
88 |
> |
multv3(nsdir, nsdir, funcxf.xfm); |
89 |
> |
varset("DxA", '=', nsdir[0]/funcxf.sca); |
90 |
> |
varset("DyA", '=', nsdir[1]/funcxf.sca); |
91 |
> |
varset("DzA", '=', nsdir[2]/funcxf.sca); |
92 |
> |
} else { |
93 |
> |
varset("DxA", '=', 0.0); |
94 |
> |
varset("DyA", '=', 0.0); |
95 |
> |
varset("DzA", '=', 0.0); |
96 |
> |
} |
97 |
|
/* compute coefficient */ |
98 |
|
errno = 0; |
99 |
|
va = mf->ep + 4*n; |
159 |
|
olddot = DOT(tr.rdir, nv); |
160 |
|
if (olddot <= FTINY && olddot >= -FTINY) |
161 |
|
return(0); /* old dir parallels plane */ |
162 |
+ |
tr.rmax = 0.0; |
163 |
|
rayorigin(&tr, NULL, PRIMARY, 1.0); |
164 |
|
if (!(*ofun[o->otype].funp)(o, &tr)) |
165 |
|
return(0); /* no intersection! */ |