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.1 by gwlarson, Thu Dec 31 16:25:26 1998 UTC vs.
Revision 3.4 by gwlarson, Wed Feb 3 10:48:06 1999 UTC

# Line 16 | Line 16 | static char SCCSid[] = "$SunId$ SGI";
16  
17   char    *progname;              /* global argv[0] */
18  
19 + long    beamtot, samptot;       /* total beams and samples */
20  
21 +
22   main(argc, argv)
23   int     argc;
24   char    *argv[];
# Line 60 | Line 62 | FILE   *fout;
62          for (n = 0; nextloc > 0L; n++) {        /* get the section(s) */
63                  lseek(fd, (long)nextloc, 0);
64                  read(fd, (char *)&nextloc, sizeof(nextloc));
65 +                fprintf(fout, "Section %d:\n", n);
66                  hdsect = hdinit(fd, NULL);      /* load section directory */
64                fprintf(fout,"Section %d:\n",n);
67                  psectstats(hdsect, fout);       /* print section statistics */
68          }
69          nextloc = hdfilen(fd);                  /* print global statistics */
70 +        fputs("=====================================================\n", fout);
71 +        fprintf(fout, "Total samples/beams: %ld/%ld (%.2f samples/beam)\n",
72 +                        samptot, beamtot, (double)samptot/beamtot);
73          fprintf(fout, "%.1f Mbyte file, %.1f%% fragmentation\n",
74                          nextloc/(1024.*1024.),
75                          100.*(nextloc-hdfiluse(fd,1))/nextloc);
# Line 82 | Line 87 | FILE   *fp;
87   {
88          int     scount[NHBINS];
89          int     minsamp = 10000, maxsamp = 0;
90 +        FVECT   vt;
91          double  sqrtmaxp;
92          int     bmin, bmax, cnt;
93          register int    i;
94  
95 +        fcross(vt, hp->xv[0], hp->xv[1]);
96 +        fprintf(fp, "\tWorld volume:            %g\n", fabs(DOT(vt,hp->xv[2])));
97          fprintf(fp, "\tGrid resolution:         %d x %d x %d\n",
98                          hp->grid[0], hp->grid[1], hp->grid[2]);
99 <        fprintf(fp, "\tNumber of beams:         %d\n", nbeams(hp));
100 <        fprintf(fp, "\tNumber of ray samples:   %d\n", biglob(hp)->nrd);
99 >        fprintf(fp, "\tNumber of beams:         %ld\n", (long)nbeams(hp));
100 >        beamtot += nbeams(hp);
101 >        fprintf(fp, "\tNumber of ray samples:   %ld\n", (long)biglob(hp)->nrd);
102 >        samptot += biglob(hp)->nrd;
103          if (biglob(hp)->nrd <= 0)
104                  return;                         /* no samples to stat! */
105          for (i = nbeams(hp); i > 0; i--) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines