1 |
– |
/* Copyright (c) 1986 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* o_cone.c - routine to determine ray intersection with cones. |
9 |
– |
* |
10 |
– |
* 2/13/86 |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include "copyright.h" |
9 |
+ |
|
10 |
|
#include "ray.h" |
11 |
|
|
12 |
|
#include "otypes.h" |
83 |
|
r->rop[i] = r->rorg[i] + r->rdir[i]*r->rot; |
84 |
|
VCOPY(r->ron, co->ad); |
85 |
|
r->rod = -rdx[2]; |
86 |
< |
r->rofs = 1.0; setident4(r->rofx); |
90 |
< |
r->robs = 1.0; setident4(r->robx); |
86 |
> |
r->rox = NULL; |
87 |
|
return(1); /* good */ |
88 |
|
} |
89 |
|
/* roots for cone, cup, cyl., tube */ |
127 |
|
r->ron[i] = (co->al*r->ron[i] - c*co->ad[i]) |
128 |
|
/co->sl; |
129 |
|
r->rod = -DOT(r->rdir, r->ron); |
130 |
< |
r->rofs = 1.0; setident4(r->rofx); |
131 |
< |
r->robs = 1.0; setident4(r->robx); |
130 |
> |
r->pert[0] = r->pert[1] = r->pert[2] = 0.0; |
131 |
> |
r->uv[0] = r->uv[1] = 0.0; |
132 |
> |
r->rox = NULL; |
133 |
|
return(1); /* good */ |
134 |
|
} |
135 |
|
return(0); |