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

Comparing ray/src/hd/holo.h (file contents):
Revision 3.1 by gregl, Fri Oct 31 10:23:29 1997 UTC vs.
Revision 3.9 by gregl, Thu Dec 18 14:45:59 1997 UTC

# Line 45 | Line 45 | typedef struct {
45   typedef struct {
46          short   w;              /* wall number */
47          short   i[2];           /* index on wall grid */
48 < } BCOORD[2];            /* beam grid coordinates */
48 > } GCOORD;               /* grid coordinates (two for beam) */
49  
50   typedef struct {
51          unsigned int4   nrd;    /* number of beam rays bundled on disk */
# Line 57 | Line 57 | typedef struct {
57          unsigned long   tick;   /* clock tick for LRU replacement */
58   } BEAM;                 /* followed by nrm RAYVAL's */
59  
60 < #define hdbray(bp)      (RAYVAL *)((bp)+1)
60 > #define hdbray(bp)      ((RAYVAL *)((bp)+1))
61   #define hdbsiz(nr)      (sizeof(BEAM)+(nr)*sizeof(RAYVAL))
62  
63   typedef struct {
# Line 74 | Line 74 | typedef struct holo {
74          short   dirty;          /* beam index needs update to file */
75          double  tlin;           /* linear range for depth encoding */
76          FVECT   wn[3];          /* wall normals (derived) */
77 +        double  wg[3];          /* wall grid multipliers (derived) */
78          double  wo[6];          /* wall offsets (derived) */
78        FVECT   gv[3][2];       /* grid coordinate vectors (derived) */
79          int     wi[6];          /* wall super-indices (derived) */
80          char    *priv;          /* pointer to private client data */
81          BEAM    **bl;           /* beam pointers (memory cache) */
82          BEAMI   bi[1];          /* beam index (extends struct) */
83   } HOLO;                 /* holodeck section */
84  
85 + typedef struct {
86 +        HOLO    *h;             /* pointer to holodeck */
87 +        int     b;              /* beam index */
88 + } HDBEAMI;              /* holodeck beam index */
89 +
90   #define nbeams(hp)      (2*((hp)->wi[5]-1))
91   #define biglob(hp)      ((hp)->bi)
92   #define blglob(hp)      (*(hp)->bl)
93  
94   #define bnrays(hp,i)    ((hp)->bl[i]!=NULL ? (hp)->bl[i]->nrm : (hp)->bi[i].nrd)
95  
96 < #define hdflush(hp)     (hdfreebeam(hp,0) && hdsync(hp))
96 > #define hdflush(hp)     (hdfreebeam(hp,0) && hdsync(hp,0))
97 > #define hdclobber(hp)   (hdkillbeam(hp,0) && hdsync(hp,0))
98  
99 < extern HOLO     *hdinit();
99 > extern HOLO     *hdinit(), *hdalloc();
100   extern BEAM     *hdgetbeam();
101   extern RAYVAL   *hdnewrays();
102 < extern long     hdmemuse(), hdfiluse();
102 > extern unsigned hdmemuse();
103 > extern long     hdfiluse(), hdfilen();
104   extern double   hdray(), hdinter();
105   extern unsigned hdcode();
106  
107 < extern int      hdcachesize;            /* target cache size (bytes) */
107 > extern unsigned hdcachesize;            /* target cache size (bytes) */
108   extern unsigned long    hdclock;        /* holodeck system clock */
109   extern HOLO     *hdlist[HDMAX+1];       /* holodeck pointers (NULL term.) */
110  
# Line 117 | Line 124 | extern float   hd_depthmap[];          /* depth conversion map *
124   * blank line, with "FORMAT=Holodeck" somewhere in it.
125   * The first integer after the information header is the
126   * above magic number, which includes the file format version number.
127 < * The first longword after the magic number is the position
128 < * of the SECOND holodeck section, or 0 if there is only one.
127 > * The first longword after the magic number is a pointer to the pointer
128 > * just before the SECOND holodeck section, or 0 if there is only one.
129   * This longword is immediately followed by the first holodeck
130   * section header and directory.
131   * Similarly, every holodeck section in the file is preceeded by

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines