1 |
gregl |
3.1 |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
2 |
|
|
|
3 |
|
|
/* SCCSid "$SunId$ SGI" */ |
4 |
|
|
|
5 |
|
|
/* |
6 |
|
|
* Header file for rholo program |
7 |
|
|
*/ |
8 |
|
|
|
9 |
|
|
#include "holo.h" |
10 |
|
|
#include "vars.h" |
11 |
|
|
|
12 |
|
|
#ifndef RPACKSIZ |
13 |
|
|
#define RPACKSIZ 21 /* good packet size */ |
14 |
|
|
#endif |
15 |
|
|
|
16 |
|
|
typedef struct packet { |
17 |
|
|
int2 hd; /* holodeck section (first) */ |
18 |
|
|
int4 bi; /* beam index (second) */ |
19 |
|
|
int4 nr; /* number of rays (third) */ |
20 |
|
|
RAYVAL ra[RPACKSIZ]; /* ray values (fourth) */ |
21 |
|
|
float *offset; /* offset array if !vbool(OBSTRUCTIONS) */ |
22 |
|
|
struct packet *next; /* next in packet list */ |
23 |
|
|
} PACKET; /* a beam packet */ |
24 |
|
|
|
25 |
|
|
typedef struct { |
26 |
|
|
int2 hd; /* holodeck section (first) */ |
27 |
|
|
int4 bi; /* beam index (second) */ |
28 |
|
|
int4 nr; /* number of rays (third) */ |
29 |
|
|
} PACKHEAD; /* followed by ray values */ |
30 |
|
|
|
31 |
|
|
#define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL)) |
32 |
|
|
#define packray(p) (RAYVAL *)((PACKHEAD *)(p)+1) |
33 |
|
|
|
34 |
|
|
/* input variables */ |
35 |
|
|
#define RENDER 0 /* rendering options */ |
36 |
|
|
#define VIEW 1 /* starting view */ |
37 |
|
|
#define SECTION 2 /* holodeck section boundaries */ |
38 |
|
|
#define OCTREE 3 /* octree file name */ |
39 |
|
|
#define RIF 4 /* rad input file */ |
40 |
|
|
#define EXPOSURE 5 /* section exposure value */ |
41 |
|
|
#define TIME 6 /* maximum rendering time */ |
42 |
|
|
#define DISKSPACE 7 /* how much disk space to use */ |
43 |
|
|
#define CACHE 8 /* amount of memory to use as cache */ |
44 |
|
|
#define GRID 9 /* target grid size */ |
45 |
|
|
#define OBSTRUCTIONS 10 /* shall we track obstructions? */ |
46 |
|
|
#define OCCUPANCY 11 /* expected occupancy probability */ |
47 |
|
|
#define REPORT 12 /* report interval and error file */ |
48 |
|
|
|
49 |
|
|
#define NRHVARS 13 /* number of variables */ |
50 |
|
|
|
51 |
|
|
#define RHVINIT { \ |
52 |
|
|
{"render", 3, 0, NULL, catvalues}, \ |
53 |
|
|
{"view", 2, 0, NULL, NULL}, \ |
54 |
|
|
{"section", 3, 0, NULL, NULL}, \ |
55 |
|
|
{"OCTREE", 3, 0, NULL, onevalue}, \ |
56 |
|
|
{"RIF", 3, 0, NULL, onevalue}, \ |
57 |
|
|
{"EXPOSURE", 3, 0, NULL, fltvalue}, \ |
58 |
|
|
{"TIME", 2, 0, NULL, fltvalue}, \ |
59 |
|
|
{"DISKSPACE", 3, 0, NULL, fltvalue}, \ |
60 |
|
|
{"CACHE", 2, 0, NULL, fltvalue}, \ |
61 |
|
|
{"GRID", 2, 0, NULL, fltvalue}, \ |
62 |
|
|
{"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \ |
63 |
|
|
{"OCCUPANCY", 3, 0, NULL, onevalue}, \ |
64 |
|
|
{"REPORT", 3, 0, NULL, onevalue}, \ |
65 |
|
|
} |
66 |
|
|
|
67 |
|
|
extern char *progname; /* our program name */ |
68 |
|
|
extern char *hdkfile; /* holodeck file name */ |
69 |
|
|
extern char froot[]; /* root file name */ |
70 |
|
|
|
71 |
|
|
extern int nowarn; /* turn warnings off? */ |
72 |
|
|
|
73 |
|
|
extern double expval; /* global exposure value */ |
74 |
|
|
|
75 |
|
|
extern int ncprocs; /* number of compute processes */ |
76 |
|
|
|
77 |
|
|
extern time_t starttime; /* time we got started */ |
78 |
|
|
extern time_t endtime; /* time we should end by */ |
79 |
|
|
extern time_t reporttime; /* time for next report */ |
80 |
|
|
|
81 |
|
|
extern int rtargc; /* rtrace command */ |
82 |
|
|
extern char *rtargv[]; |
83 |
|
|
|
84 |
|
|
extern PACKET *do_packets(), *get_packets(), *flush_queue(); |