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.3 by greg, Wed Apr 19 21:35:57 1989 UTC vs.
Revision 1.7 by greg, Fri Jan 19 00:00:17 1990 UTC

# Line 24 | Line 24 | register RAY  *r;
24          register INSTANCE  *in;
25          register int  i;
26                                          /* get the octree */
27 <        in = getinstance(o, GET_ALL);
27 >        in = getinstance(o, IO_ALL);
28                                          /* copy old ray */
29 <        bcopy(r, &rcont, sizeof(RAY));
29 >        copystruct(&rcont, r);
30                                          /* transform it */
31          rcont.rno = nrays;
32          rcont.ro = NULL;
33          rcont.rot = FHUGE;
34        rcont.rno = nrays;
34          multp3(rcont.rorg, r->rorg, in->b.xfm);
35          multv3(rcont.rdir, r->rdir, in->b.xfm);
36          for (i = 0; i < 3; i++)
# Line 41 | Line 40 | register RAY  *r;
40                  return(0);              /* missed */
41          if (rcont.rot * in->f.sca >= r->rot)
42                  return(0);              /* not close enough */
43 <                                        /* if we have modifier, use it */
44 <        if (o->omod != OVOID)
43 >
44 >        if (o->omod != OVOID) {         /* if we have modifier, use it */
45                  r->ro = o;
46 <        else {                          /* else use theirs */
46 >                r->rofs = 1.0; setident4(r->rofx);
47 >                r->robs = 1.0; setident4(r->robx);
48 >        } else {                        /* else use theirs */
49                  r->ro = rcont.ro;
50                  multmat4(r->rofx, rcont.rofx, in->f.xfm);
51                  r->rofs = rcont.rofs * in->f.sca;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines