--- ray/src/hd/rholo3.c 2004/01/01 11:21:55 3.41 +++ ray/src/hd/rholo3.c 2010/09/30 14:10:19 3.43 @@ -1,21 +1,20 @@ #ifndef lint -static const char RCSid[] = "$Id: rholo3.c,v 3.41 2004/01/01 11:21:55 schorsch Exp $"; +static const char RCSid[] = "$Id: rholo3.c,v 3.43 2010/09/30 14:10:19 greg Exp $"; #endif /* * Routines for tracking beam compuatations */ -#include -#include -#include - -#include "view.h" #include "rholo.h" #ifndef NFRAG2CHUNK #define NFRAG2CHUNK 4096 /* number of fragments to start chunking */ #endif +#ifndef MAXADISK +#define MAXADISK 10240. /* maximum holodeck size (Megs) for ambient */ +#endif + #ifndef abs #define abs(x) ((x) > 0 ? (x) : -(x)) #endif @@ -288,6 +287,7 @@ ambient_list(void) /* compute ambient beam list */ /* compute beam weights */ k = 0; wtotal = 0; for (j = 0; hdlist[j] != NULL; j++) { + /* 512. arbitrary -- adjusted below */ frac = 512. * VLEN(hdlist[j]->wg[0]) * VLEN(hdlist[j]->wg[1]) * VLEN(hdlist[j]->wg[2]); @@ -303,7 +303,7 @@ ambient_list(void) /* compute ambient beam list */ if (vdef(DISKSPACE)) frac = 1024.*1024.*vflt(DISKSPACE) / (wtotal*sizeof(RAYVAL)); else - frac = 1024.*1024.*2048. / (wtotal*sizeof(RAYVAL)); + frac = 1024.*1024.*MAXADISK / (wtotal*sizeof(RAYVAL)); minrt = .02*frac*wtotal/complen + .5; /* heuristic mimimum */ if (minrt > RPACKSIZ) minrt = RPACKSIZ;