4 |
|
* Header file for rcontrib modules |
5 |
|
*/ |
6 |
|
|
7 |
+ |
#include "platform.h" |
8 |
+ |
#include "paths.h" |
9 |
+ |
#include "rtprocess.h" |
10 |
|
#include "ray.h" |
11 |
|
#include "func.h" |
12 |
|
#include "lookup.h" |
39 |
|
extern RNUMBER raysleft; /* number of rays left to trace */ |
40 |
|
extern long waitflush; /* how long until next flush */ |
41 |
|
|
42 |
< |
extern int lastray; /* last ray number sent */ |
43 |
< |
extern int lastdone; /* last ray processed */ |
42 |
> |
extern RNUMBER lastray; /* last ray number sent */ |
43 |
> |
extern RNUMBER lastdone; /* last ray processed */ |
44 |
|
|
45 |
+ |
extern int report_intvl; /* reporting interval (seconds) */ |
46 |
+ |
|
47 |
|
typedef double DCOLOR[3]; /* double-precision color */ |
48 |
|
|
49 |
|
/* |
59 |
|
typedef struct { |
60 |
|
const char *outspec; /* output file specification */ |
61 |
|
const char *modname; /* modifier name */ |
62 |
+ |
const char *params; /* parameter list */ |
63 |
|
EPNODE *binv; /* bin value expression */ |
64 |
+ |
int bin0; /* starting bin offset */ |
65 |
|
int nbins; /* number of contribution bins */ |
66 |
|
DCOLOR cbin[1]; /* contribution bins (extends struct) */ |
67 |
|
} MODCONT; /* modifier contribution */ |
82 |
|
extern LUTAB ofiletab; /* output stream table */ |
83 |
|
|
84 |
|
#ifndef MAXPROCESS |
85 |
< |
#ifdef _WIN32 |
85 |
> |
#if defined(_WIN32) || defined(_WIN64) |
86 |
|
#define MAXPROCESS 1 |
87 |
|
#else |
88 |
|
#define MAXPROCESS 128 |
89 |
|
#endif |
90 |
|
#endif |
91 |
|
|
92 |
< |
#ifndef MAXMODLIST |
86 |
< |
#define MAXMODLIST 2048 /* maximum modifiers we'll track */ |
87 |
< |
#endif |
88 |
< |
#ifndef MAXTSET |
89 |
< |
#define MAXTSET 16383 /* maximum number in trace set */ |
90 |
< |
#endif |
91 |
< |
|
92 |
< |
extern const char *modname[MAXMODLIST]; /* ordered modifier name list */ |
92 |
> |
extern char **modname; /* ordered modifier name list */ |
93 |
|
extern int nmods; /* number of modifiers */ |
94 |
+ |
extern int modasiz; /* allocated modifier array size */ |
95 |
|
|
96 |
|
extern char RCCONTEXT[]; /* special evaluation context */ |
97 |
|
|
97 |
– |
extern void tranotify(OBJECT obj); /* new trace modifier */ |
98 |
– |
|
99 |
– |
extern char *formstr(int f); /* return format identifier */ |
100 |
– |
|
98 |
|
extern void process_rcontrib(void); /* trace ray contributions */ |
99 |
|
|
100 |
|
extern STREAMOUT * getostream(const char *ospec, const char *mname, |
104 |
|
extern void end_record(void); |
105 |
|
|
106 |
|
extern MODCONT *addmodifier(char *modn, char *outf, |
107 |
< |
char *binv, int bincnt); |
107 |
> |
char *prms, char *binv, int bincnt); |
108 |
|
extern void addmodfile(char *fname, char *outf, |
109 |
< |
char *binv, int bincnt); |
109 |
> |
char *prms, char *binv, int bincnt); |
110 |
|
|
111 |
|
extern void reload_output(void); |
112 |
|
extern void recover_output(void); |
114 |
|
extern int getvec(FVECT vec); |
115 |
|
|
116 |
|
extern int in_rchild(void); |
117 |
< |
extern void end_children(void); |
117 |
> |
extern void end_children(int immed); |
118 |
|
|
119 |
|
extern void put_zero_record(int ndx); |
123 |
– |
extern void queue_modifiers(void); |
120 |
|
|
121 |
+ |
extern int morays(void); /* reached end of input? */ |
122 |
+ |
|
123 |
|
extern void parental_loop(void); /* controlling process */ |
124 |
+ |
|
125 |
+ |
extern void feeder_loop(void); /* feeder process */ |
126 |
|
|
127 |
|
extern void rcontrib(void); /* main calculation loop */ |