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

Comparing ray/src/hd/rhdisp3.c (file contents):
Revision 3.10 by gwlarson, Tue Jul 7 11:07:42 1998 UTC vs.
Revision 3.16 by greg, Tue Jun 8 19:48:30 2004 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Holodeck beam support for display process
6   */
7  
8   #include "rholo.h"
9   #include "rhdisp.h"
13 #include "view.h"
10  
11   struct cellist {
12          GCOORD  *cl;
# Line 30 | Line 26 | int    bi;
26          FVECT   cp[4], ip[4], pf, pb;
27          double  af, ab, sf2, sb2, dfb2, df2, db2, penalty;
28          register int    i;
29 +                                        /* special case */
30 +        if (hr <= 0 | vr <= 0)
31 +                return(0);
32                                          /* compute cell corners in image */
33          if (!hdbcoord(gc, hp, bi))
34                  error(CONSISTENCY, "bad beam index in npixels");
# Line 53 | Line 52 | int    bi;
52                  (ip[1][0]-ip[3][0])*(ip[2][1]-ip[3][1]);
53          af *= af >= 0 ? 0.5 : -0.5;
54   getback:
55 <        copystruct(&vrev, vp);          /* compute reverse view */
55 >        vrev = *vp;             /* compute reverse view */
56          for (i = 0; i < 3; i++) {
57                  vrev.vdir[i] = -vp->vdir[i];
58                  vrev.vup[i] = -vp->vup[i];
# Line 239 | Line 238 | addcell(gcp, cl)               /* add a cell to a list */
238   GCOORD  *gcp;
239   register struct cellist *cl;
240   {
241 <        copystruct(cl->cl+cl->n, gcp);
241 >        *(cl->cl+cl->n) = *gcp;
242          cl->n++;
243          return(1);
244   }
# Line 281 | Line 280 | VIEW   *vp;
280          if (cl.cl == NULL)
281                  goto memerr;
282          cl.n = 0;                       /* add cells within pyramid */
283 <        visit_cells(org, dir, hp, addcell, &cl);
283 >        visit_cells(org, dir, hp, addcell, (char *)&cl);
284          if (!cl.n) {
285 <                free((char *)cl.cl);
285 >                free((void *)cl.cl);
286                  return(NULL);
287          }
288          *np = cl.n * orient;
# Line 292 | Line 291 | VIEW   *vp;
291           * sorted automatically by visit_cells(), so we don't need this.
292           */
293                                          /* optimize memory use */
294 <        cl.cl = (GCOORD *)realloc((char *)cl.cl, cl.n*sizeof(GCOORD));
294 >        cl.cl = (GCOORD *)realloc((void *)cl.cl, cl.n*sizeof(GCOORD));
295          if (cl.cl == NULL)
296                  goto memerr;
297                                          /* sort the list */
# Line 304 | Line 303 | memerr:
303   }
304  
305  
306 < gridlines(f)                    /* run through holodeck section grid lines */
307 < int     (*f)();
306 > extern void
307 > gridlines(                      /* run through holodeck section grid lines */
308 >        void    (*f)(FVECT wp[2])
309 > )
310   {
311          register int    hd, w, i;
312          int     g0, g1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines