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

Comparing ray/src/rt/srcobstr.c (file contents):
Revision 2.15 by greg, Sat Dec 12 00:03:42 2009 UTC vs.
Revision 2.18 by greg, Thu May 28 09:13:19 2015 UTC

# Line 58 | Line 58 | castshadow(int sn, FVECT rorg, FVECT rdir)
58   void                                    /* initialize occlusion cache */
59   initobscache(int sn)
60   {
61 <        register SRCREC *srcp = &source[sn];
62 <        int             cachelen;
63 <        FVECT           rorg, rdir;
64 <        RREAL           d;
65 <        int             i, j, k;
66 <        int             ax, ax1, ax2;
61 >        SRCREC  *srcp = &source[sn];
62 >        int     cachelen;
63 >        FVECT   rorg, rdir;
64 >        RREAL   d;
65 >        int     i, j, k;
66 >        int     ax=0, ax1=1, ax2=2;
67  
68          if (srcp->sflags & (SSKIP|SPROX|SSPOT|SVIRTUAL))
69                  return;                 /* don't cache these */
# Line 178 | Line 178 | initobscache(int sn)
178  
179  
180   static OBJECT *                 /* return occluder cache entry */
181 < srcobstructp(register RAY *r)
181 > srcobstructp(RAY *r)
182   {
183          static RNUMBER  lastrno = ~0;
184          static OBJECT   noobs;
# Line 200 | Line 200 | srcobstructp(register RAY *r)
200                  initobscache(r->rsrc);
201                                          /* compute cache index */
202          if (srcp->sflags & SDISTANT) {
203 <                int     ax, ax1, ax2;
203 >                int     ax=0, ax1=1, ax2=2;
204                  double  t;
205                  ax = srcp->obscache->p.d.ax;
206                  if ((ax1 = ax+1) >= 3) ax1 -= 3;
# Line 288 | Line 288 | freeobscache(SRCREC *srcp)
288  
289          
290   int                             /* record a source blocker */
291 < srcblocker(register RAY *r)
291 > srcblocker(RAY *r)
292   {
293          OBJREC  *m;
294  
# Line 335 | Line 335 | markclip(OBJREC *m)
335   {
336          OBJECT  *set2add, *oldset;
337  
338 +        if (m == NULL) {                /* starting over */
339 +                if (antimodlist != NULL)
340 +                        free((void *)antimodlist);
341 +                antimodlist = NULL;
342 +                return;
343 +        }
344          m_clip(m, NULL);                /* initialize modifier list */
345          if ((set2add = (OBJECT *)m->os) == NULL || !set2add[0])
346                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines