ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.h
Revision: 3.4
Committed: Wed Nov 26 20:16:01 1997 UTC (26 years, 4 months ago) by gregl
Content type: text/plain
Branch: MAIN
Changes since 3.3: +7 -9 lines
Log Message:
minor changes

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 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 packra(p) ((RAYVAL *)((p)+1))
33
34 /* input variables */
35 #define RENDER 0 /* rendering options */
36 #define SECTION 1 /* holodeck section boundaries */
37 #define OCTREE 2 /* octree file name */
38 #define RIF 3 /* rad input file */
39 #define EXPOSURE 4 /* section exposure value */
40 #define TIME 5 /* maximum rendering time */
41 #define DISKSPACE 6 /* how much disk space to use */
42 #define CACHE 7 /* amount of memory to use as cache */
43 #define GRID 8 /* target grid size */
44 #define OBSTRUCTIONS 9 /* shall we track obstructions? */
45 #define OCCUPANCY 10 /* expected occupancy probability */
46 #define REPORT 11 /* report interval and error file */
47
48 #define NRHVARS 12 /* number of variables */
49
50 #define RHVINIT { \
51 {"render", 3, 0, NULL, catvalues}, \
52 {"section", 3, 0, NULL, NULL}, \
53 {"OCTREE", 3, 0, NULL, onevalue}, \
54 {"RIF", 3, 0, NULL, onevalue}, \
55 {"EXPOSURE", 3, 0, NULL, fltvalue}, \
56 {"TIME", 2, 0, NULL, fltvalue}, \
57 {"DISKSPACE", 3, 0, NULL, fltvalue}, \
58 {"CACHE", 2, 0, NULL, fltvalue}, \
59 {"GRID", 2, 0, NULL, fltvalue}, \
60 {"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \
61 {"OCCUPANCY", 3, 0, NULL, onevalue}, \
62 {"REPORT", 3, 0, NULL, onevalue}, \
63 }
64
65 /* bundle set requests */
66 #define BS_NEW 1 /* replace current set with new one */
67 #define BS_ADD 2 /* add to current set */
68 #define BS_DEL 3 /* delete from current set */
69
70 extern char *progname; /* our program name */
71 extern char *hdkfile; /* holodeck file name */
72 extern char froot[]; /* root file name */
73
74 extern char *outdev; /* output device name */
75
76 extern int nowarn; /* turn warnings off? */
77
78 extern int ncprocs; /* number of compute processes */
79
80 extern double expval; /* global exposure value */
81
82 extern time_t starttime; /* time we got started */
83 extern time_t endtime; /* time we should end by */
84 extern time_t reporttime; /* time for next report */
85
86 extern int rtargc; /* rtrace command */
87 extern char *rtargv[];
88
89 extern PACKET *do_packets(), *get_packets(), *flush_queue();