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

Comparing ray/src/hd/rhinfo.c (file contents):
Revision 3.3 by gwlarson, Wed Jan 20 15:16:35 1999 UTC vs.
Revision 3.8 by greg, Mon Oct 20 16:01:55 2003 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   * Get general information on holodeck file
6   */
7  
8   #include "holo.h"
9 + #include "platform.h"
10  
11   #ifndef NHBINS
12   #define NHBINS          12      /* number of histogram bins to use for stats */
# Line 40 | Line 38 | gethdinfo(fname, fout)         /* get information on holodeck
38   char    *fname;
39   FILE    *fout;
40   {
43        extern long     ftell();
41          FILE    *fp;
42          HOLO    *hdsect;
43          int     fd;
44 <        int4    nextloc;
44 >        int32   nextloc;
45          int     n;
46                                          /* open holodeck file */
47          if ((fp = fopen(fname, "r")) == NULL) {
# Line 60 | Line 57 | FILE   *fout;
57          nextloc = ftell(fp);                    /* get stdio position */
58          fclose(fp);                             /* done with stdio */
59          for (n = 0; nextloc > 0L; n++) {        /* get the section(s) */
60 <                lseek(fd, (long)nextloc, 0);
60 >                lseek(fd, (off_t)nextloc, SEEK_SET);
61                  read(fd, (char *)&nextloc, sizeof(nextloc));
62                  fprintf(fout, "Section %d:\n", n);
63                  hdsect = hdinit(fd, NULL);      /* load section directory */
# Line 87 | Line 84 | FILE   *fp;
84   {
85          int     scount[NHBINS];
86          int     minsamp = 10000, maxsamp = 0;
87 +        FVECT   vt;
88          double  sqrtmaxp;
89          int     bmin, bmax, cnt;
90          register int    i;
91  
92 +        fcross(vt, hp->xv[0], hp->xv[1]);
93 +        fprintf(fp, "\tWorld volume:            %g\n", fabs(DOT(vt,hp->xv[2])));
94          fprintf(fp, "\tGrid resolution:         %d x %d x %d\n",
95                          hp->grid[0], hp->grid[1], hp->grid[2]);
96          fprintf(fp, "\tNumber of beams:         %ld\n", (long)nbeams(hp));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines