ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.h
Revision: 3.22
Committed: Fri Jun 20 00:25:49 2003 UTC (20 years, 9 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 3.21: +10 -10 lines
Log Message:
Changed instances of "int4" to "int32" and "int2" to "int16"

File Contents

# Content
1 /* RCSid: $Id: rholo.h,v 3.21 2003/02/22 02:07:25 greg Exp $ */
2 /*
3 * Header file for rholo program
4 */
5
6 #include "holo.h"
7 #include "vars.h"
8
9 #ifndef RPACKSIZ
10 #define RPACKSIZ 21 /* good packet size */
11 #endif
12
13 typedef struct packet {
14 int16 hd; /* holodeck section (first) */
15 int32 bi; /* beam index (second) */
16 int32 nr; /* number of rays (third) */
17 int32 nc; /* number calculated (fourth) */
18 RAYVAL ra[RPACKSIZ]; /* ray values (fifth) */
19 float *offset; /* offset array if !vbool(OBSTRUCTIONS) */
20 struct packet *next; /* next in packet list */
21 } PACKET; /* a beam packet */
22
23 typedef struct {
24 int16 hd; /* holodeck section (first) */
25 int32 bi; /* beam index (second) */
26 int32 nr; /* number of rays (third) */
27 int32 nc; /* number calculated (fourth) */
28 } PACKHEAD; /* followed by ray values */
29
30 #define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL))
31 #define packra(p) ((RAYVAL *)((p)+1))
32
33 typedef struct {
34 int nb; /* number of beams in list */
35 PACKHEAD *bl; /* allocated beam list */
36 } BEAMLIST; /* a list of beam requests */
37
38 typedef struct {
39 FVECT vpt; /* view (eye point) position */
40 double rng; /* desired mean radius for sample rays */
41 } VIEWPOINT; /* target eye position */
42
43 /* input variables */
44 #define CACHE 0 /* amount of memory to use as cache */
45 #define DISKSPACE 1 /* how much disk space to use */
46 #define EYESEP 2 /* eye separation distance */
47 #define GEOMETRY 3 /* section geometry */
48 #define GRID 4 /* target grid size */
49 #define OBSTRUCTIONS 5 /* shall we track obstructions? */
50 #define OCTREE 6 /* octree file name */
51 #define PORTS 7 /* section portals */
52 #define RENDER 8 /* rendering options */
53 #define REPORT 9 /* report interval and error file */
54 #define RIF 10 /* rad input file */
55 #define SECTION 11 /* holodeck section boundaries */
56 #define TIME 12 /* maximum rendering time */
57 #define VDIST 13 /* virtual distance calculation */
58
59 #define NRHVARS 14 /* number of variables */
60
61 #define RHVINIT { \
62 {"CACHE", 2, 0, NULL, fltvalue}, \
63 {"DISKSPACE", 3, 0, NULL, fltvalue}, \
64 {"EYESEP", 3, 0, NULL, fltvalue}, \
65 {"geometry", 3, 0, NULL, NULL}, \
66 {"GRID", 2, 0, NULL, fltvalue}, \
67 {"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \
68 {"OCTREE", 3, 0, NULL, onevalue}, \
69 {"portals", 3, 0, NULL, NULL}, \
70 {"render", 3, 0, NULL, catvalues}, \
71 {"REPORT", 3, 0, NULL, onevalue}, \
72 {"RIF", 3, 0, NULL, onevalue}, \
73 {"section", 3, 0, NULL, NULL}, \
74 {"TIME", 2, 0, NULL, fltvalue}, \
75 {"VDISTANCE", 2, 0, NULL, boolvalue}, \
76 }
77
78 /* bundle set requests */
79 #define BS_NEW 1 /* replace current set with new one */
80 #define BS_ADD 2 /* add to current set */
81 #define BS_ADJ 3 /* adjust current set quantities */
82 #define BS_DEL 4 /* delete from current set */
83 #define BS_MAX 5 /* set to max of old and new */
84
85 extern char *progname; /* our program name */
86 extern char *hdkfile; /* holodeck file name */
87 extern char froot[]; /* root file name */
88
89 extern char *outdev; /* output device name */
90
91 extern int readinp; /* read input from stdin */
92
93 extern int force; /* allow overwrite of holodeck */
94
95 extern int nowarn; /* turn warnings off? */
96
97 extern int ncprocs; /* number of requested compute processes */
98 extern int nprocs; /* number of running compute processes */
99
100 extern int chunkycmp; /* using "chunky" comparison mode */
101
102 extern VIEWPOINT myeye; /* target view position */
103
104 extern time_t starttime; /* time we got started */
105 extern time_t endtime; /* time we should end by */
106 extern time_t reporttime; /* time for next report */
107
108 extern long nraysdone; /* number of rays done */
109 extern long npacksdone; /* number of packets done */
110
111 extern int rtargc; /* rtrace command */
112 extern char *rtargv[];
113
114 extern PACKET *do_packets(), *get_packets(), *flush_queue();
115
116 extern int16 *viewbeams();