ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo.h
(Generate patch)

Comparing ray/src/hd/rholo.h (file contents):
Revision 3.7 by gregl, Tue Dec 2 12:29:18 1997 UTC vs.
Revision 3.24 by schorsch, Thu Jan 1 11:21:55 2004 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1997 Silicon Graphics, Inc. */
2 <
3 < /* SCCSid "$SunId$ SGI" */
4 <
1 > /* RCSid: $Id$ */
2   /*
3   * Header file for rholo program
4   */
5 + #ifndef _RAD_RHOLO_H_
6 + #define _RAD_RHOLO_H_
7  
8 + #include <stdio.h>
9 +
10 + #include "view.h"
11   #include "holo.h"
12   #include "vars.h"
13  
14 + #ifdef __cplusplus
15 + extern "C" {
16 + #endif
17 +
18   #ifndef RPACKSIZ
19   #define RPACKSIZ        21              /* good packet size */
20   #endif
21  
22   typedef struct packet {
23 <        int2    hd;             /* holodeck section (first) */
24 <        int4    bi;             /* beam index (second) */
25 <        int4    nr;             /* number of rays (third) */
26 <        int4    nc;             /* number calculated (fourth) */
27 <        RAYVAL  ra[RPACKSIZ];   /* ray values (fourth) */
23 >        int16   hd;             /* holodeck section (first) */
24 >        int32   bi;             /* beam index (second) */
25 >        int32   nr;             /* number of rays (third) */
26 >        int32   nc;             /* number calculated (fourth) */
27 >        RAYVAL  ra[RPACKSIZ];   /* ray values (fifth) */
28          float   *offset;        /* offset array if !vbool(OBSTRUCTIONS) */
29          struct packet   *next;  /* next in packet list */
30   } PACKET;               /* a beam packet */
31  
32   typedef struct {
33 <        int2    hd;             /* holodeck section (first) */
34 <        int4    bi;             /* beam index (second) */
35 <        int4    nr;             /* number of rays (third) */
36 <        int4    nc;             /* number calculated (fourth) */
33 >        int16   hd;             /* holodeck section (first) */
34 >        int32   bi;             /* beam index (second) */
35 >        int32   nr;             /* number of rays (third) */
36 >        int32   nc;             /* number calculated (fourth) */
37   } PACKHEAD;             /* followed by ray values */
38  
39   #define packsiz(nr)     (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL))
40   #define packra(p)       ((RAYVAL *)((p)+1))
41  
42 + typedef struct {
43 +        int     nb;             /* number of beams in list */
44 +        PACKHEAD        *bl;    /* allocated beam list */
45 + } BEAMLIST;             /* a list of beam requests */
46 +
47 + typedef struct {
48 +        FVECT   vpt;            /* view (eye point) position */
49 +        double  rng;            /* desired mean radius for sample rays */
50 + } VIEWPOINT;            /* target eye position */
51 +
52                                  /* input variables */
53 < #define RENDER          0               /* rendering options */
54 < #define SECTION         1               /* holodeck section boundaries */
55 < #define OCTREE          2               /* octree file name */
56 < #define RIF             3               /* rad input file */
57 < #define TIME            4               /* maximum rendering time */
58 < #define DISKSPACE       5               /* how much disk space to use */
59 < #define CACHE           6               /* amount of memory to use as cache */
60 < #define GRID            7               /* target grid size */
61 < #define OBSTRUCTIONS    8               /* shall we track obstructions? */
62 < #define VDIST           9               /* virtual distance calculation */
63 < #define OCCUPANCY       10              /* expected occupancy probability */
64 < #define REPORT          11              /* report interval and error file */
53 > #define CACHE           0               /* amount of memory to use as cache */
54 > #define DISKSPACE       1               /* how much disk space to use */
55 > #define EYESEP          2               /* eye separation distance */
56 > #define GEOMETRY        3               /* section geometry */
57 > #define GRID            4               /* target grid size */
58 > #define OBSTRUCTIONS    5               /* shall we track obstructions? */
59 > #define OCTREE          6               /* octree file name */
60 > #define PORTS           7               /* section portals */
61 > #define RENDER          8               /* rendering options */
62 > #define REPORT          9               /* report interval and error file */
63 > #define RIF             10              /* rad input file */
64 > #define SECTION         11              /* holodeck section boundaries */
65 > #define TIME            12              /* maximum rendering time */
66 > #define VDIST           13              /* virtual distance calculation */
67  
68 < #define NRHVARS         12              /* number of variables */
68 > #define NRHVARS         14              /* number of variables */
69  
70   #define RHVINIT { \
53        {"render",      3,      0,      NULL,   catvalues}, \
54        {"section",     3,      0,      NULL,   NULL}, \
55        {"OCTREE",      3,      0,      NULL,   onevalue}, \
56        {"RIF",         3,      0,      NULL,   onevalue}, \
57        {"TIME",        2,      0,      NULL,   fltvalue}, \
58        {"DISKSPACE",   3,      0,      NULL,   fltvalue}, \
71          {"CACHE",       2,      0,      NULL,   fltvalue}, \
72 +        {"DISKSPACE",   3,      0,      NULL,   fltvalue}, \
73 +        {"EYESEP",      3,      0,      NULL,   fltvalue}, \
74 +        {"geometry",    3,      0,      NULL,   NULL}, \
75          {"GRID",        2,      0,      NULL,   fltvalue}, \
76          {"OBSTRUCTIONS",3,      0,      NULL,   boolvalue}, \
77 <        {"VDISTANCE",   2,      0,      NULL,   boolvalue}, \
78 <        {"OCCUPANCY",   3,      0,      NULL,   onevalue}, \
77 >        {"OCTREE",      3,      0,      NULL,   onevalue}, \
78 >        {"portals",     3,      0,      NULL,   NULL}, \
79 >        {"render",      3,      0,      NULL,   catvalues}, \
80          {"REPORT",      3,      0,      NULL,   onevalue}, \
81 +        {"RIF",         3,      0,      NULL,   onevalue}, \
82 +        {"section",     3,      0,      NULL,   NULL}, \
83 +        {"TIME",        2,      0,      NULL,   fltvalue}, \
84 +        {"VDISTANCE",   2,      0,      NULL,   boolvalue}, \
85   }
86  
87                                  /* bundle set requests */
# Line 69 | Line 89 | typedef struct {
89   #define BS_ADD          2               /* add to current set */
90   #define BS_ADJ          3               /* adjust current set quantities */
91   #define BS_DEL          4               /* delete from current set */
92 + #define BS_MAX          5               /* set to max of old and new */
93  
94   extern char     *progname;      /* our program name */
95   extern char     *hdkfile;       /* holodeck file name */
# Line 76 | Line 97 | extern char    froot[];        /* root file name */
97  
98   extern char     *outdev;        /* output device name */
99  
100 + extern int      readinp;        /* read input from stdin */
101 +
102 + extern int      force;          /* allow overwrite of holodeck */
103 +
104   extern int      nowarn;         /* turn warnings off? */
105  
106 < extern int      ncprocs;        /* number of compute processes */
106 > extern int      ncprocs;        /* number of requested compute processes */
107 > extern int      nprocs;         /* number of running compute processes */
108  
109 < extern double   expval;         /* global exposure value */
109 > extern int      chunkycmp;      /* using "chunky" comparison mode */
110  
111 + extern VIEWPOINT        myeye;  /* target view position */
112 +
113   extern time_t   starttime;      /* time we got started */
114   extern time_t   endtime;        /* time we should end by */
115   extern time_t   reporttime;     /* time for next report */
116  
117 + extern long     nraysdone;      /* number of rays done */
118 + extern long     npacksdone;     /* number of packets done */
119 +
120   extern int      rtargc;         /* rtrace command */
121   extern char     *rtargv[];
122  
123 < extern PACKET   *do_packets(), *get_packets(), *flush_queue();
123 >        /* rholo.c */
124 > extern void done_packets(PACKET *pl);
125 >        /* rholo2.c */
126 > extern void new_rtrace(void);
127 > extern int done_rtrace(void);
128 > extern void packrays(float *rod, PACKET *p);
129 > extern void donerays(PACKET *p, float *rvl);
130 > extern int getradfile(void);
131 > extern void report(time_t t);
132 >        /* rholo2l.c */
133 > extern int start_rtrace(void);
134 > extern int end_rtrace(void);
135 > extern PACKET *do_packets(PACKET *pl);
136 > extern PACKET *flush_queue(void);
137 >        /* rholo3.c */
138 > extern void init_global(void);
139 > extern int next_packet(PACKET *p, int   n);
140 > extern void bundle_set(int op, PACKHEAD *clist, int nents);
141 >        /* rholo4.c */
142 > extern void disp_open(char *dname);
143 > extern void disp_packet(register PACKHEAD *p);
144 > extern int disp_check(int block);
145 > extern int disp_close(void);
146 >        /* viewbeams.c */
147 > extern int nextview(VIEW *vp, FILE *fp);
148 > extern int16 * viewbeams(VIEW *vp, int hr, int vr, BEAMLIST *blp);
149 >
150 > #ifdef __cplusplus
151 > }
152 > #endif
153 > #endif /* _RAD_RHOLO_H_ */
154 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines