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

Comparing ray/src/hd/rhdisp2.c (file contents):
Revision 3.23 by gwlarson, Mon Jul 6 18:17:00 1998 UTC vs.
Revision 3.24 by gwlarson, Tue Sep 15 15:59:31 1998 UTC

# Line 29 | Line 29 | static VOXL voxel[MAXVOXEL] = {{-1}};  /* current voxel
29  
30   static struct beamcomp {
31          int     hd;             /* holodeck section number */
32 <        int4    bi;             /* beam index */
32 >        int     bi;             /* beam index */
33          int4    nr;             /* number of samples desired */
34   } *cbeam = NULL;        /* current beam list */
35  
# Line 307 | Line 307 | register struct cellact        *cap;
307                  }
308          }
309   #ifdef DEBUG
310 <        if (axmax < 0.)
310 >        if (axmax < 0)
311                  error(CONSISTENCY, "botched axis computation in docell");
312   #endif
313                                  /* compute offset vectors */
# Line 349 | Line 349 | struct cellact *cap;
349   }
350  
351  
352 < beam_init()                     /* clear beam list for new view(s) */
352 > beam_init(fresh)                /* clear beam list for new view(s) */
353 > int     fresh;
354   {
355          register int    i;
356 <                                        /* clear desire flags */
357 <        for (i = ncbeams+xcbeams; i--; )
358 <                cbeam[i].nr = 0;
356 >
357 >        if (fresh)                      /* discard old beams? */
358 >                ncbeams = xcbeams = 0;
359 >        else                            /* else clear sample requests */
360 >                for (i = ncbeams+xcbeams; i--; )
361 >                        cbeam[i].nr = 0;
362          voxel[0].hd = -1;               /* clear voxel list */
363   }
364  
# Line 384 | Line 388 | int
388   beam_sync(all)                  /* update beam list on server */
389   int     all;
390   {
391 <                                        /* sort list to put orphans at end */
392 <        cbeamsort(0);
391 >                                        /* sort list (put orphans at end) */
392 >        cbeamsort(all < 0);
393          if (all)
394                  cbeamop(DR_NEWSET, cbeam, ncbeams);
395          else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines