ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.h
Revision: 3.15
Committed: Wed Aug 26 12:42:27 1998 UTC (26 years, 2 months ago) by gwlarson
Content type: text/plain
Branch: MAIN
Changes since 3.14: +1 -1 lines
Log Message:
fixed error in comment

File Contents

# Content
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 int4 nc; /* number calculated (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 */
25
26 typedef struct {
27 int2 hd; /* holodeck section (first) */
28 int4 bi; /* beam index (second) */
29 int4 nr; /* number of rays (third) */
30 int4 nc; /* number calculated (fourth) */
31 } PACKHEAD; /* followed by ray values */
32
33 #define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL))
34 #define packra(p) ((RAYVAL *)((p)+1))
35
36 /* input variables */
37 #define CACHE 0 /* amount of memory to use as cache */
38 #define DISKSPACE 1 /* how much disk space to use */
39 #define EYESEP 2 /* eye separation distance */
40 #define GRID 3 /* target grid size */
41 #define OBSTRUCTIONS 4 /* shall we track obstructions? */
42 #define OCTREE 5 /* octree file name */
43 #define RENDER 6 /* rendering options */
44 #define REPORT 7 /* report interval and error file */
45 #define RIF 8 /* rad input file */
46 #define SECTION 9 /* holodeck section boundaries */
47 #define TIME 10 /* maximum rendering time */
48 #define VDIST 11 /* virtual distance calculation */
49
50 #define NRHVARS 12 /* number of variables */
51
52 #define RHVINIT { \
53 {"CACHE", 2, 0, NULL, fltvalue}, \
54 {"DISKSPACE", 3, 0, NULL, fltvalue}, \
55 {"EYESEP", 3, 0, NULL, fltvalue}, \
56 {"GRID", 2, 0, NULL, fltvalue}, \
57 {"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \
58 {"OCTREE", 3, 0, NULL, onevalue}, \
59 {"render", 3, 0, NULL, catvalues}, \
60 {"REPORT", 3, 0, NULL, onevalue}, \
61 {"RIF", 3, 0, NULL, onevalue}, \
62 {"section", 3, 0, NULL, NULL}, \
63 {"TIME", 2, 0, NULL, fltvalue}, \
64 {"VDISTANCE", 2, 0, NULL, boolvalue}, \
65 }
66
67 /* bundle set requests */
68 #define BS_NEW 1 /* replace current set with new one */
69 #define BS_ADD 2 /* add to current set */
70 #define BS_ADJ 3 /* adjust current set quantities */
71 #define BS_DEL 4 /* delete from current set */
72
73 extern char *progname; /* our program name */
74 extern char *hdkfile; /* holodeck file name */
75 extern char froot[]; /* root file name */
76
77 extern char *outdev; /* output device name */
78
79 extern int readinp; /* read input from stdin */
80
81 extern int force; /* allow overwrite of holodeck */
82
83 extern int nowarn; /* turn warnings off? */
84
85 extern int ncprocs; /* number of requested compute processes */
86 extern int nprocs; /* number of running compute processes */
87
88 extern double expval; /* global exposure value */
89
90 extern time_t starttime; /* time we got started */
91 extern time_t endtime; /* time we should end by */
92 extern time_t reporttime; /* time for next report */
93
94 extern long nraysdone; /* number of rays done */
95 extern long npacksdone; /* number of packets done */
96
97 extern int rtargc; /* rtrace command */
98 extern char *rtargv[];
99
100 extern PACKET *do_packets(), *get_packets(), *flush_queue();