| 73 |
|
int fd; /* file descriptor */ |
| 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) */ |
| 76 |
> |
FVECT wg[3]; /* wall grid vectors (derived) */ |
| 77 |
> |
double wo[6]; /* wall grid offsets (derived) */ |
| 78 |
|
int wi[6]; /* wall super-indices (derived) */ |
| 79 |
|
char *priv; /* pointer to private client data */ |
| 80 |
|
BEAM **bl; /* beam pointers (memory cache) */ |
| 86 |
|
int b; /* beam index */ |
| 87 |
|
} HDBEAMI; /* holodeck beam index */ |
| 88 |
|
|
| 89 |
< |
#define nbeams(hp) (2*((hp)->wi[5]-1)) |
| 89 |
> |
#define nbeams(hp) (((hp)->wi[5]-1)<<1) |
| 90 |
|
#define biglob(hp) ((hp)->bi) |
| 91 |
|
#define blglob(hp) (*(hp)->bl) |
| 92 |
|
|
| 99 |
|
extern BEAM *hdgetbeam(); |
| 100 |
|
extern RAYVAL *hdnewrays(); |
| 101 |
|
extern unsigned hdmemuse(); |
| 102 |
< |
extern long hdfiluse(), hdfilen(); |
| 102 |
> |
extern long hdfiluse(), hdfilen(), hdallocfrag(); |
| 103 |
|
extern double hdray(), hdinter(); |
| 104 |
|
extern unsigned hdcode(); |
| 105 |
+ |
extern int hdfilord(); |
| 106 |
|
|
| 107 |
|
extern unsigned hdcachesize; /* target cache size (bytes) */ |
| 108 |
|
extern unsigned long hdclock; /* holodeck system clock */ |
| 110 |
|
|
| 111 |
|
extern float hd_depthmap[]; /* depth conversion map */ |
| 112 |
|
|
| 113 |
+ |
extern int hdwg0[6]; /* wall grid 0 index */ |
| 114 |
+ |
extern int hdwg1[6]; /* wall grid 1 index */ |
| 115 |
+ |
|
| 116 |
|
#define hddepth(hp,dc) ( (dc) >= DCINF ? FHUGE : \ |
| 117 |
|
(hp)->tlin * ( (dc) >= DCLIN ? \ |
| 118 |
|
hd_depthmap[(dc)-DCLIN] : \ |
| 120 |
|
|
| 121 |
|
#define HOLOFMT "Holodeck" /* file format identifier */ |
| 122 |
|
#define HOLOVERS 0 /* file format version number */ |
| 123 |
< |
#define HOLOMAGIC (327+HOLOVERS) /* file magic number */ |
| 123 |
> |
#define HOLOMAGIC (323+sizeof(long)+8*HOLOVERS) /* file magic number */ |
| 124 |
|
|
| 125 |
|
/* |
| 126 |
|
* A holodeck file consists of an information header terminated by a |