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

Comparing ray/src/hd/rholo3.c (file contents):
Revision 3.41 by schorsch, Thu Jan 1 11:21:55 2004 UTC vs.
Revision 3.43 by greg, Thu Sep 30 14:10:19 2010 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   * Routines for tracking beam compuatations
6   */
7  
8 #include <time.h>
9 #include <string.h>
10 #include <stdio.h>
11
12 #include "view.h"
8   #include "rholo.h"
9  
10   #ifndef NFRAG2CHUNK
11   #define NFRAG2CHUNK     4096    /* number of fragments to start chunking */
12   #endif
13  
14 + #ifndef MAXADISK
15 + #define MAXADISK        10240.  /* maximum holodeck size (Megs) for ambient */
16 + #endif
17 +
18   #ifndef abs
19   #define abs(x)          ((x) > 0 ? (x) : -(x))
20   #endif
# Line 288 | Line 287 | ambient_list(void)                     /* compute ambient beam list */
287                                          /* compute beam weights */
288          k = 0; wtotal = 0;
289          for (j = 0; hdlist[j] != NULL; j++) {
290 +                                        /* 512. arbitrary -- adjusted below */
291                  frac = 512. * VLEN(hdlist[j]->wg[0]) *
292                                  VLEN(hdlist[j]->wg[1]) *
293                                  VLEN(hdlist[j]->wg[2]);
# Line 303 | Line 303 | ambient_list(void)                     /* compute ambient beam list */
303          if (vdef(DISKSPACE))
304                  frac = 1024.*1024.*vflt(DISKSPACE) / (wtotal*sizeof(RAYVAL));
305          else
306 <                frac = 1024.*1024.*2048. / (wtotal*sizeof(RAYVAL));
306 >                frac = 1024.*1024.*MAXADISK / (wtotal*sizeof(RAYVAL));
307          minrt = .02*frac*wtotal/complen + .5;   /* heuristic mimimum */
308          if (minrt > RPACKSIZ)
309                  minrt = RPACKSIZ;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines