1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
/* SCCSid "$SunId$ SGI" */ |
4 |
|
|
18 |
|
int4 bi; /* beam index (second) */ |
19 |
|
int4 nr; /* number of rays (third) */ |
20 |
|
int4 nc; /* number calculated (fourth) */ |
21 |
< |
RAYVAL ra[RPACKSIZ]; /* ray values (fourth) */ |
21 |
> |
RAYVAL ra[RPACKSIZ]; /* ray values (fifth) */ |
22 |
|
float *offset; /* offset array if !vbool(OBSTRUCTIONS) */ |
23 |
|
struct packet *next; /* next in packet list */ |
24 |
|
} PACKET; /* a beam packet */ |
33 |
|
#define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL)) |
34 |
|
#define packra(p) ((RAYVAL *)((p)+1)) |
35 |
|
|
36 |
+ |
typedef struct { |
37 |
+ |
FVECT vpt; /* view (eye point) position */ |
38 |
+ |
double rng; /* desired mean radius for sample rays */ |
39 |
+ |
} VIEWPOINT; /* target eye position */ |
40 |
+ |
|
41 |
|
/* input variables */ |
42 |
< |
#define RENDER 0 /* rendering options */ |
43 |
< |
#define SECTION 1 /* holodeck section boundaries */ |
44 |
< |
#define OCTREE 2 /* octree file name */ |
45 |
< |
#define RIF 3 /* rad input file */ |
46 |
< |
#define TIME 4 /* maximum rendering time */ |
47 |
< |
#define DISKSPACE 5 /* how much disk space to use */ |
48 |
< |
#define CACHE 6 /* amount of memory to use as cache */ |
49 |
< |
#define GRID 7 /* target grid size */ |
50 |
< |
#define OBSTRUCTIONS 8 /* shall we track obstructions? */ |
51 |
< |
#define VDIST 9 /* virtual distance calculation */ |
52 |
< |
#define OCCUPANCY 10 /* expected occupancy probability */ |
53 |
< |
#define REPORT 11 /* report interval and error file */ |
42 |
> |
#define CACHE 0 /* amount of memory to use as cache */ |
43 |
> |
#define DISKSPACE 1 /* how much disk space to use */ |
44 |
> |
#define EYESEP 2 /* eye separation distance */ |
45 |
> |
#define GRID 3 /* target grid size */ |
46 |
> |
#define OBSTRUCTIONS 4 /* shall we track obstructions? */ |
47 |
> |
#define OCTREE 5 /* octree file name */ |
48 |
> |
#define OSECTION 6 /* section octree */ |
49 |
> |
#define RENDER 7 /* rendering options */ |
50 |
> |
#define REPORT 8 /* report interval and error file */ |
51 |
> |
#define RIF 9 /* rad input file */ |
52 |
> |
#define SECTION 10 /* holodeck section boundaries */ |
53 |
> |
#define TIME 11 /* maximum rendering time */ |
54 |
> |
#define VDIST 12 /* virtual distance calculation */ |
55 |
|
|
56 |
< |
#define NRHVARS 12 /* number of variables */ |
56 |
> |
#define NRHVARS 13 /* number of variables */ |
57 |
|
|
58 |
|
#define RHVINIT { \ |
53 |
– |
{"render", 3, 0, NULL, catvalues}, \ |
54 |
– |
{"section", 3, 0, NULL, NULL}, \ |
55 |
– |
{"OCTREE", 3, 0, NULL, onevalue}, \ |
56 |
– |
{"RIF", 3, 0, NULL, onevalue}, \ |
57 |
– |
{"TIME", 2, 0, NULL, fltvalue}, \ |
58 |
– |
{"DISKSPACE", 3, 0, NULL, fltvalue}, \ |
59 |
|
{"CACHE", 2, 0, NULL, fltvalue}, \ |
60 |
+ |
{"DISKSPACE", 3, 0, NULL, fltvalue}, \ |
61 |
+ |
{"EYESEP", 3, 0, NULL, fltvalue}, \ |
62 |
|
{"GRID", 2, 0, NULL, fltvalue}, \ |
63 |
|
{"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \ |
64 |
< |
{"VDISTANCE", 2, 0, NULL, boolvalue}, \ |
65 |
< |
{"OCCUPANCY", 3, 0, NULL, onevalue}, \ |
64 |
> |
{"OCTREE", 3, 0, NULL, onevalue}, \ |
65 |
> |
{"osection", 2, 0, NULL, NULL}, \ |
66 |
> |
{"render", 3, 0, NULL, catvalues}, \ |
67 |
|
{"REPORT", 3, 0, NULL, onevalue}, \ |
68 |
+ |
{"RIF", 3, 0, NULL, onevalue}, \ |
69 |
+ |
{"section", 3, 0, NULL, NULL}, \ |
70 |
+ |
{"TIME", 2, 0, NULL, fltvalue}, \ |
71 |
+ |
{"VDISTANCE", 2, 0, NULL, boolvalue}, \ |
72 |
|
} |
73 |
|
|
74 |
|
/* bundle set requests */ |
83 |
|
|
84 |
|
extern char *outdev; /* output device name */ |
85 |
|
|
86 |
+ |
extern int readinp; /* read input from stdin */ |
87 |
+ |
|
88 |
+ |
extern int force; /* allow overwrite of holodeck */ |
89 |
+ |
|
90 |
|
extern int nowarn; /* turn warnings off? */ |
91 |
|
|
92 |
< |
extern int ncprocs; /* number of compute processes */ |
92 |
> |
extern int ncprocs; /* number of requested compute processes */ |
93 |
> |
extern int nprocs; /* number of running compute processes */ |
94 |
|
|
95 |
|
extern double expval; /* global exposure value */ |
96 |
|
|
97 |
+ |
extern VIEWPOINT myeye; /* target view position */ |
98 |
+ |
|
99 |
|
extern time_t starttime; /* time we got started */ |
100 |
|
extern time_t endtime; /* time we should end by */ |
101 |
|
extern time_t reporttime; /* time for next report */ |
102 |
+ |
|
103 |
+ |
extern long nraysdone; /* number of rays done */ |
104 |
+ |
extern long npacksdone; /* number of packets done */ |
105 |
|
|
106 |
|
extern int rtargc; /* rtrace command */ |
107 |
|
extern char *rtargv[]; |