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

Comparing ray/src/rt/srcdraw.c (file contents):
Revision 2.16 by greg, Tue Apr 19 01:15:07 2005 UTC vs.
Revision 2.17 by greg, Tue Jul 8 18:25:00 2014 UTC

# Line 70 | Line 70 | inregion(                      /* check if vertex is in region */
70  
71   static void
72   clipregion(             /* find intersection with boundary */
73 <        register RREAL  a[2],
74 <        register RREAL  b[2],
73 >        RREAL   a[2],
74 >        RREAL   b[2],
75          double  cv,
76          int     crit,
77          RREAL   r[2]    /* return value */
# Line 102 | Line 102 | hp_clip_poly(  /* clip polygon to half-plane */
102   )
103   {
104          RREAL   *s, *p;
105 <        register int    j, nvo;
105 >        int     j, nvo;
106  
107          s = vl[nv-1];
108          nvo = 0;
# Line 151 | Line 151 | minw2(                 /* compute square of minimum width */
151   )
152   {
153          double  d2, w2, w2min, w2max;
154 <        register RREAL  *p0, *p1, *p2;
154 >        RREAL   *p0, *p1, *p2;
155          int     i, j;
156                                  /* find minimum for all widths */
157          w2min = FHUGE;
# Line 179 | Line 179 | minw2(                 /* compute square of minimum width */
179  
180   static void
181   convex_center(          /* compute center of convex polygon */
182 <        register RREAL  vl[][2],
182 >        RREAL   vl[][2],
183          int     nv,
184          RREAL   cv[2]           /* return value */
185   )
186   {
187 <        register int    i;
187 >        int     i;
188                                          /* simple average (suboptimal) */
189          cv[0] = cv[1] = 0.;
190          for (i = 0; i < nv; i++) {
# Line 198 | Line 198 | convex_center(         /* compute center of convex polygon */
198  
199   static double
200   poly_area(                      /* compute area of polygon */
201 <        register RREAL  vl[][2],
201 >        RREAL   vl[][2],
202          int     nv
203   )
204   {
205          double  a;
206          RREAL   v0[2], v1[2];
207 <        register int    i;
207 >        int     i;
208  
209          a = 0.;
210          v0[0] = vl[1][0] - vl[0][0];
# Line 229 | Line 229 | convex_hull(           /* compute polygon's convex hull */
229          int     nvo, nvt;
230          RREAL   vlt[MAXVERT][2];
231          double  voa, vta;
232 <        register int    i, j;
232 >        int     i, j;
233                                          /* start with original polygon */
234          for (i = nvo = nv; i--; ) {
235                  vlo[i][0] = vl[i][0]; vlo[i][1] = vl[i][1];
# Line 263 | Line 263 | spinsert(                      /* insert new source polygon */
263          int     nv
264   )
265   {
266 <        register SPLIST *spn;
267 <        register int    i;
266 >        SPLIST  *spn;
267 >        int     i;
268  
269          if (nv < 3)
270                  return;
# Line 293 | Line 293 | sourcepoly(                    /* compute image polygon for source */
293                                           {0,1,3,7,6,4},{0,1,5,7,6,2},
294                                           {0,2,6,7,5,1},{0,4,6,7,3,1},
295                                           {0,2,3,7,5,4},{1,5,4,6,2,3}};
296 <        register SRCREC *s = source + sn;
296 >        SRCREC  *s = source + sn;
297          FVECT   ap, ip;
298          RREAL   pt[6][2];
299          int     dir;
300 <        register int    i, j;
300 >        int     i, j;
301  
302          if (s->sflags & (SDISTANT|SFLAT)) {
303                  if (s->sflags & SDISTANT) {
# Line 358 | Line 358 | sourcepoly(                    /* compute image polygon for source */
358  
359  
360                          /* initialize by finding sources smaller than rad */
361 < extern void
361 > void
362   init_drawsources(
363          int     rad                             /* source sample size */
364   )
365   {
366          RREAL   spoly[MAXVERT][2];
367          int     nsv;
368 <        register SPLIST *sp;
369 <        register int    i;
368 >        SPLIST  *sp;
369 >        int     i;
370                                          /* free old source list if one */
371          for (sp = sphead; sp != NULL; sp = sphead) {
372                  sphead = sp->next;
# Line 392 | Line 392 | init_drawsources(
392          }
393   }
394  
395 < extern void                     /* add sources smaller than rad to computed subimage */
395 > void                            /* add sources smaller than rad to computed subimage */
396   drawsources(
397          COLOR   *pic[],                         /* subimage pixel value array */
398          float   *zbf[],                         /* subimage distance array (opt.) */
# Line 408 | Line 408 | drawsources(
408          RREAL   cxy[2];
409          double  w;
410          RAY     sr;
411 <        register SPLIST *sp;
412 <        register int    i;
411 >        SPLIST  *sp;
412 >        int     i;
413                                          /* check each source in our list */
414          for (sp = sphead; sp != NULL; sp = sp->next) {
415                                          /* clip source poly to subimage */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines