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

Comparing ray/src/rt/m_direct.c (file contents):
Revision 2.13 by greg, Tue Apr 19 01:15:06 2005 UTC vs.
Revision 2.15 by greg, Tue Jul 8 18:25:00 2014 UTC

# Line 39 | Line 39 | VSMATERIAL  direct2_vs = {dir_proj, 2};
39                                  getfunc(m, 8, 0xff, 1) )
40  
41  
42 < extern int
42 > int
43   m_direct(                       /* shade redirected ray */
44 <        register OBJREC  *m,
45 <        register RAY  *r
44 >        OBJREC  *m,
45 >        RAY  *r
46   )
47   {
48                                          /* check if source ray */
# Line 68 | Line 68 | redirect(              /* compute n'th ray redirection */
68   )
69   {
70          MFUNC  *mf;
71 <        register EPNODE  **va;
71 >        EPNODE  **va;
72          FVECT  nsdir;
73          RAY  nr;
74          double  coef;
75 <        register int  j;
75 >        int  j;
76                                          /* set up function */
77          mf = getdfunc(m);
78          setfunc(m, r);
79                                          /* assign direction variable */
80          if (r->rsrc >= 0) {
81 <                register SRCREC  *sp = source + source[r->rsrc].sa.sv.sn;
81 >                SRCREC  *sp = source + source[r->rsrc].sa.sv.sn;
82  
83                  if (sp->sflags & SDISTANT)
84                          VCOPY(nsdir, sp->sloc);
# Line 111 | Line 111 | redirect(              /* compute n'th ray redirection */
111                  if (errno == EDOM || errno == ERANGE)
112                          goto computerr;
113          }
114 <        if (mf->f != &unitxf)
115 <                multv3(nr.rdir, nr.rdir, mf->f->xfm);
114 >        if (mf->fxp != &unitxf)
115 >                multv3(nr.rdir, nr.rdir, mf->fxp->xfm);
116          if (r->rox != NULL)
117                  multv3(nr.rdir, nr.rdir, r->rox->f.xfm);
118          if (normalize(nr.rdir) == 0.0)
# Line 146 | Line 146 | dir_proj(              /* compute a director's projection */
146          EPNODE  **va;
147          FVECT  cent, newdir, nv, h;
148          double  coef, olddot, newdot, od;
149 <        register int  i, j;
149 >        int  i, j;
150                                  /* initialize test ray */
151          getmaxdisk(cent, o);
152          if (s->sflags & SDISTANT)
# Line 190 | Line 190 | dir_proj(              /* compute a director's projection */
190                  if (errno == EDOM || errno == ERANGE)
191                          goto computerr;
192          }
193 <        if (mf->f != &unitxf)
194 <                multv3(newdir, newdir, mf->f->xfm);
193 >        if (mf->fxp != &unitxf)
194 >                multv3(newdir, newdir, mf->fxp->xfm);
195                                          /* normalization unnecessary */
196          newdot = DOT(newdir, nv);
197          if (newdot <= FTINY && newdot >= -FTINY)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines