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

Comparing ray/src/hd/rholo2.c (file contents):
Revision 3.27 by schorsch, Sun Jul 27 22:12:02 2003 UTC vs.
Revision 3.28 by schorsch, Thu Jan 1 11:21:55 2004 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   * Rtrace support routines for holodeck rendering
6   */
7  
8 + #include <time.h>
9 +
10   #include "rholo.h"
11   #include "paths.h"
12   #include "random.h"
# Line 20 | Line 22 | struct gclim {
22          double  gmin[2], gmax[2];       /* grid coordinate limits */
23   };                              /* a grid coordinate range */
24  
25 + static void initeyelim(struct gclim     *gcl, HOLO      *hp, GCOORD     *gc);
26 + static void groweyelim(struct gclim *gcl, GCOORD *gc,
27 +                double r0, double r1, int tight);
28 + static int clipeyelim(short     rrng[2][2], struct gclim        *gcl);
29  
30 < static
31 < initeyelim(gcl, hp, gc)         /* initialize grid coordinate limits */
32 < register struct gclim   *gcl;
33 < register HOLO   *hp;
34 < GCOORD  *gc;
30 >
31 > static void
32 > initeyelim(             /* initialize grid coordinate limits */
33 >        register struct gclim   *gcl,
34 >        register HOLO   *hp,
35 >        GCOORD  *gc
36 > )
37   {
38          register RREAL  *v;
39          register int    i;
# Line 44 | Line 52 | GCOORD *gc;
52   }
53  
54  
55 < static
56 < groweyelim(gcl, gc, r0, r1, tight)      /* grow grid limits about eye point */
57 < register struct gclim   *gcl;
58 < GCOORD  *gc;
59 < double  r0, r1;
60 < int     tight;
55 > static void
56 > groweyelim(     /* grow grid limits about eye point */
57 >        register struct gclim   *gcl,
58 >        GCOORD  *gc,
59 >        double  r0,
60 >        double  r1,
61 >        int     tight
62 > )
63   {
64          FVECT   gp, ab;
65          double  ab2, od, cfact;
# Line 145 | Line 155 | int    tight;
155  
156  
157   static int
158 < clipeyelim(rrng, gcl)           /* clip eye limits to grid cell */
159 < register short  rrng[2][2];
160 < register struct gclim   *gcl;
158 > clipeyelim(             /* clip eye limits to grid cell */
159 >        register short  rrng[2][2],
160 >        register struct gclim   *gcl
161 > )
162   {
163          int     incell = 1;
164          register int    i;
# Line 170 | Line 181 | register struct gclim  *gcl;
181   }
182  
183  
184 < packrays(rod, p)                /* pack ray origins and directions */
185 < register float  *rod;
186 < register PACKET *p;
184 > extern void
185 > packrays(               /* pack ray origins and directions */
186 >        register float  *rod,
187 >        register PACKET *p
188 > )
189   {
190   #if 0
191          double  dist2sum = 0.;
# Line 252 | Line 265 | register PACKET        *p;
265   }
266  
267  
268 < donerays(p, rvl)                /* encode finished ray computations */
269 < register PACKET *p;
270 < register float  *rvl;
268 > extern void
269 > donerays(               /* encode finished ray computations */
270 >        register PACKET *p,
271 >        register float  *rvl
272 > )
273   {
274          double  d;
275          register int    i;
# Line 271 | Line 286 | register float *rvl;
286   }
287  
288  
289 < int
290 < done_rtrace()                   /* clean up and close rtrace calculation */
289 > extern int
290 > done_rtrace(void)                       /* clean up and close rtrace calculation */
291   {
292          int     status;
293                                          /* already closed? */
# Line 293 | Line 308 | done_rtrace()                  /* clean up and close rtrace calculati
308   }
309  
310  
311 < new_rtrace()                    /* restart rtrace calculation */
311 > extern void
312 > new_rtrace(void)                        /* restart rtrace calculation */
313   {
314          char    combuf[128];
315  
# Line 317 | Line 333 | new_rtrace()                   /* restart rtrace calculation */
333   }
334  
335  
336 < getradfile()                    /* run rad and get needed variables */
336 > extern int
337 > getradfile(void)                        /* run rad and get needed variables */
338   {
339          static short    mvar[] = {OCTREE,EYESEP,-1};
340          static char     tf1[] = TEMPLATE;
341          char    tf2[64];
342          char    combuf[256];
343 <        char    *pippt;
343 >        char    *pippt = NULL;
344          register int    i;
345          register char   *cp;
346                                          /* check if rad file specified */
# Line 365 | Line 382 | getradfile()                   /* run rad and get needed variables */
382   }
383  
384  
385 < report(t)                       /* report progress so far */
386 < time_t  t;
385 > extern void
386 > report(                 /* report progress so far */
387 >        time_t  t
388 > )
389   {
390          static time_t   seconds2go = 1000000;
391  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines