| 1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 2 |
< |
|
| 3 |
< |
/* SCCSid "$SunId$ SGI" */ |
| 4 |
< |
|
| 1 |
> |
/* RCSid: $Id$ */ |
| 2 |
|
/* |
| 3 |
|
* Header file for rholo program |
| 4 |
|
*/ |
| 5 |
+ |
#ifndef _RAD_RHOLO_H_ |
| 6 |
+ |
#define _RAD_RHOLO_H_ |
| 7 |
|
|
| 8 |
|
#include "holo.h" |
| 9 |
|
#include "vars.h" |
| 10 |
|
|
| 11 |
+ |
#ifdef __cplusplus |
| 12 |
+ |
extern "C" { |
| 13 |
+ |
#endif |
| 14 |
+ |
|
| 15 |
|
#ifndef RPACKSIZ |
| 16 |
|
#define RPACKSIZ 21 /* good packet size */ |
| 17 |
|
#endif |
| 18 |
|
|
| 19 |
|
typedef struct packet { |
| 20 |
< |
int2 hd; /* holodeck section (first) */ |
| 21 |
< |
int4 bi; /* beam index (second) */ |
| 22 |
< |
int4 nr; /* number of rays (third) */ |
| 23 |
< |
int4 nc; /* number calculated (fourth) */ |
| 20 |
> |
int16 hd; /* holodeck section (first) */ |
| 21 |
> |
int32 bi; /* beam index (second) */ |
| 22 |
> |
int32 nr; /* number of rays (third) */ |
| 23 |
> |
int32 nc; /* number calculated (fourth) */ |
| 24 |
|
RAYVAL ra[RPACKSIZ]; /* ray values (fifth) */ |
| 25 |
|
float *offset; /* offset array if !vbool(OBSTRUCTIONS) */ |
| 26 |
|
struct packet *next; /* next in packet list */ |
| 27 |
|
} PACKET; /* a beam packet */ |
| 28 |
|
|
| 29 |
|
typedef struct { |
| 30 |
< |
int2 hd; /* holodeck section (first) */ |
| 31 |
< |
int4 bi; /* beam index (second) */ |
| 32 |
< |
int4 nr; /* number of rays (third) */ |
| 33 |
< |
int4 nc; /* number calculated (fourth) */ |
| 30 |
> |
int16 hd; /* holodeck section (first) */ |
| 31 |
> |
int32 bi; /* beam index (second) */ |
| 32 |
> |
int32 nr; /* number of rays (third) */ |
| 33 |
> |
int32 nc; /* number calculated (fourth) */ |
| 34 |
|
} PACKHEAD; /* followed by ray values */ |
| 35 |
|
|
| 36 |
|
#define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL)) |
| 37 |
|
#define packra(p) ((RAYVAL *)((p)+1)) |
| 38 |
|
|
| 39 |
|
typedef struct { |
| 40 |
+ |
int nb; /* number of beams in list */ |
| 41 |
+ |
PACKHEAD *bl; /* allocated beam list */ |
| 42 |
+ |
} BEAMLIST; /* a list of beam requests */ |
| 43 |
+ |
|
| 44 |
+ |
typedef struct { |
| 45 |
|
FVECT vpt; /* view (eye point) position */ |
| 46 |
|
double rng; /* desired mean radius for sample rays */ |
| 47 |
|
} VIEWPOINT; /* target eye position */ |
| 86 |
|
#define BS_ADD 2 /* add to current set */ |
| 87 |
|
#define BS_ADJ 3 /* adjust current set quantities */ |
| 88 |
|
#define BS_DEL 4 /* delete from current set */ |
| 89 |
+ |
#define BS_MAX 5 /* set to max of old and new */ |
| 90 |
|
|
| 91 |
|
extern char *progname; /* our program name */ |
| 92 |
|
extern char *hdkfile; /* holodeck file name */ |
| 118 |
|
extern char *rtargv[]; |
| 119 |
|
|
| 120 |
|
extern PACKET *do_packets(), *get_packets(), *flush_queue(); |
| 121 |
+ |
|
| 122 |
+ |
extern int16 *viewbeams(); |
| 123 |
+ |
|
| 124 |
+ |
|
| 125 |
+ |
#ifdef __cplusplus |
| 126 |
+ |
} |
| 127 |
+ |
#endif |
| 128 |
+ |
#endif /* _RAD_RHOLO_H_ */ |
| 129 |
+ |
|