--- ray/src/hd/rhinfo.c 1999/01/05 11:17:25 3.2 +++ ray/src/hd/rhinfo.c 1999/02/03 10:48:06 3.4 @@ -16,7 +16,9 @@ static char SCCSid[] = "$SunId$ SGI"; char *progname; /* global argv[0] */ +long beamtot, samptot; /* total beams and samples */ + main(argc, argv) int argc; char *argv[]; @@ -65,6 +67,9 @@ FILE *fout; psectstats(hdsect, fout); /* print section statistics */ } nextloc = hdfilen(fd); /* print global statistics */ + fputs("=====================================================\n", fout); + fprintf(fout, "Total samples/beams: %ld/%ld (%.2f samples/beam)\n", + samptot, beamtot, (double)samptot/beamtot); fprintf(fout, "%.1f Mbyte file, %.1f%% fragmentation\n", nextloc/(1024.*1024.), 100.*(nextloc-hdfiluse(fd,1))/nextloc); @@ -82,14 +87,19 @@ FILE *fp; { int scount[NHBINS]; int minsamp = 10000, maxsamp = 0; + FVECT vt; double sqrtmaxp; int bmin, bmax, cnt; register int i; + fcross(vt, hp->xv[0], hp->xv[1]); + fprintf(fp, "\tWorld volume: %g\n", fabs(DOT(vt,hp->xv[2]))); fprintf(fp, "\tGrid resolution: %d x %d x %d\n", hp->grid[0], hp->grid[1], hp->grid[2]); - fprintf(fp, "\tNumber of beams: %d\n", nbeams(hp)); - fprintf(fp, "\tNumber of ray samples: %d\n", biglob(hp)->nrd); + fprintf(fp, "\tNumber of beams: %ld\n", (long)nbeams(hp)); + beamtot += nbeams(hp); + fprintf(fp, "\tNumber of ray samples: %ld\n", (long)biglob(hp)->nrd); + samptot += biglob(hp)->nrd; if (biglob(hp)->nrd <= 0) return; /* no samples to stat! */ for (i = nbeams(hp); i > 0; i--) {