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 */ |
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 { |
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) */ |
90 |
|
|
91 |
|
#define hdflush(hp) (hdfreebeam(hp,0) && hdsync(hp)) |
92 |
|
|
93 |
< |
extern HOLO *hdinit(); |
93 |
> |
extern HOLO *hdinit(), *hdalloc(); |
94 |
|
extern BEAM *hdgetbeam(); |
95 |
|
extern RAYVAL *hdnewrays(); |
96 |
|
extern long hdmemuse(), hdfiluse(); |