ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.h
Revision: 3.19
Committed: Tue Feb 2 16:13:24 1999 UTC (25 years, 2 months ago) by gwlarson
Content type: text/plain
Branch: MAIN
Changes since 3.18: +1 -1 lines
Log Message:
made chunkycmp global and added test for it in rholo()

File Contents

# User Rev Content
1 gwlarson 3.16 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2 gregl 3.1
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 gregl 3.5 int4 nc; /* number calculated (fourth) */
21 gwlarson 3.15 RAYVAL ra[RPACKSIZ]; /* ray values (fifth) */
22 gregl 3.1 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 gregl 3.5 int4 nc; /* number calculated (fourth) */
31 gregl 3.1 } PACKHEAD; /* followed by ray values */
32    
33     #define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL))
34 gregl 3.3 #define packra(p) ((RAYVAL *)((p)+1))
35 gregl 3.1
36 gwlarson 3.16 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 gregl 3.1 /* input variables */
42 gwlarson 3.14 #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 gwlarson 3.18 #define GEOMETRY 3 /* section geometry */
46     #define GRID 4 /* target grid size */
47     #define OBSTRUCTIONS 5 /* shall we track obstructions? */
48     #define OCTREE 6 /* octree file name */
49     #define PORTS 7 /* section portals */
50     #define RENDER 8 /* rendering options */
51     #define REPORT 9 /* report interval and error file */
52     #define RIF 10 /* rad input file */
53     #define SECTION 11 /* holodeck section boundaries */
54     #define TIME 12 /* maximum rendering time */
55     #define VDIST 13 /* virtual distance calculation */
56 gregl 3.1
57 gwlarson 3.18 #define NRHVARS 14 /* number of variables */
58 gregl 3.1
59     #define RHVINIT { \
60 gwlarson 3.14 {"CACHE", 2, 0, NULL, fltvalue}, \
61     {"DISKSPACE", 3, 0, NULL, fltvalue}, \
62     {"EYESEP", 3, 0, NULL, fltvalue}, \
63 gwlarson 3.18 {"geometry", 3, 0, NULL, NULL}, \
64 gwlarson 3.14 {"GRID", 2, 0, NULL, fltvalue}, \
65     {"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \
66     {"OCTREE", 3, 0, NULL, onevalue}, \
67 gwlarson 3.18 {"portals", 3, 0, NULL, NULL}, \
68 gregl 3.1 {"render", 3, 0, NULL, catvalues}, \
69 gwlarson 3.14 {"REPORT", 3, 0, NULL, onevalue}, \
70     {"RIF", 3, 0, NULL, onevalue}, \
71 gregl 3.1 {"section", 3, 0, NULL, NULL}, \
72     {"TIME", 2, 0, NULL, fltvalue}, \
73 gregl 3.6 {"VDISTANCE", 2, 0, NULL, boolvalue}, \
74 gregl 3.1 }
75    
76 gregl 3.2 /* bundle set requests */
77 gregl 3.4 #define BS_NEW 1 /* replace current set with new one */
78     #define BS_ADD 2 /* add to current set */
79 gregl 3.5 #define BS_ADJ 3 /* adjust current set quantities */
80     #define BS_DEL 4 /* delete from current set */
81 gregl 3.2
82 gregl 3.1 extern char *progname; /* our program name */
83     extern char *hdkfile; /* holodeck file name */
84     extern char froot[]; /* root file name */
85    
86 gregl 3.4 extern char *outdev; /* output device name */
87    
88 gregl 3.8 extern int readinp; /* read input from stdin */
89    
90 gregl 3.10 extern int force; /* allow overwrite of holodeck */
91    
92 gregl 3.1 extern int nowarn; /* turn warnings off? */
93    
94 gregl 3.9 extern int ncprocs; /* number of requested compute processes */
95     extern int nprocs; /* number of running compute processes */
96 gregl 3.4
97 gwlarson 3.19 extern int chunkycmp; /* using "chunky" comparison mode */
98 gwlarson 3.16
99     extern VIEWPOINT myeye; /* target view position */
100 gregl 3.1
101     extern time_t starttime; /* time we got started */
102     extern time_t endtime; /* time we should end by */
103     extern time_t reporttime; /* time for next report */
104    
105 gregl 3.11 extern long nraysdone; /* number of rays done */
106     extern long npacksdone; /* number of packets done */
107    
108 gregl 3.1 extern int rtargc; /* rtrace command */
109     extern char *rtargv[];
110    
111     extern PACKET *do_packets(), *get_packets(), *flush_queue();