ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/o_instance.c
(Generate patch)

Comparing ray/src/rt/o_instance.c (file contents):
Revision 1.10 by greg, Mon Jun 17 08:26:20 1991 UTC vs.
Revision 1.11 by greg, Wed Jul 17 12:38:51 1991 UTC

# Line 25 | Line 25 | register RAY  *r;
25          register int  i;
26                                          /* get the octree */
27          in = getinstance(o, IO_ALL);
28 <                                        /* copy old ray */
28 >                                        /* duplicate and clear ray */
29          copystruct(&rcont, r);
30 <                                        /* transform it */
31 <        rcont.rno = raynum++;
32 <        rcont.ro = NULL;
33 <        rcont.rot = FHUGE;
30 >        rayclear(&rcont);
31 >                                        /* transform ray to new space */
32          multp3(rcont.rorg, r->rorg, in->x.b.xfm);
33          multv3(rcont.rdir, r->rdir, in->x.b.xfm);
34          for (i = 0; i < 3; i++)
35                  rcont.rdir[i] /= in->x.b.sca;
36                                          /* trace it */
37          if (!localhit(&rcont, &in->obj->scube))
38 <                return(0);              /* missed */
38 >                return(0);                      /* missed */
39          if (rcont.rot * in->x.f.sca >= r->rot)
40 <                return(0);              /* not close enough */
40 >                return(0);                      /* not close enough */
41  
42          if (o->omod != OVOID) {         /* if we have modifier, use it */
43                  r->ro = o;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines