5 |
|
*/ |
6 |
|
|
7 |
|
#include "platform.h" |
8 |
– |
#include "paths.h" |
8 |
|
#include "rtprocess.h" |
9 |
|
#include "ray.h" |
10 |
|
#include "func.h" |
43 |
|
|
44 |
|
extern int report_intvl; /* reporting interval (seconds) */ |
45 |
|
|
46 |
< |
typedef double DCOLOR[3]; /* double-precision color */ |
46 |
> |
typedef double DCOLORV; /* double-precision color type */ |
47 |
|
|
48 |
|
/* |
49 |
|
* The MODCONT structure is used to accumulate ray contributions |
52 |
|
* be replaced with the modifier name. If outspec contains a %d in it, |
53 |
|
* this will be used to create one output file per bin, otherwise all bins |
54 |
|
* will be written to the same file, in order. If the global outfmt |
55 |
< |
* is 'c', then a 4-byte RGBE pixel will be output for each bin value |
56 |
< |
* and the file will conform to a RADIANCE image if xres & yres are set. |
55 |
> |
* is 'c', then a common-exponent pixel will be output for each bin value |
56 |
> |
* and the file will conform to a RADIANCE picture if NCSAMP==3 and |
57 |
> |
* xres and yres are set. |
58 |
|
*/ |
59 |
|
typedef struct { |
60 |
|
const char *outspec; /* output file specification */ |
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) */ |
66 |
> |
DCOLORV cbin[1]; /* contribution bins (extends struct) */ |
67 |
|
} MODCONT; /* modifier contribution */ |
68 |
|
|
69 |
+ |
#define DCOLORSIZ (sizeof(DCOLORV)*NCSAMP) |
70 |
+ |
#define mcsize(nb) (sizeof(MODCONT)-sizeof(DCOLORV)+(nb)*DCOLORSIZ) |
71 |
+ |
#define mcbin(mp,bi) ((mp)->cbin + (bi)*NCSAMP) |
72 |
+ |
|
73 |
|
extern LUTAB modconttab; /* modifier contribution table */ |
74 |
|
|
75 |
|
/* |
98 |
|
extern int modasiz; /* allocated modifier array size */ |
99 |
|
|
100 |
|
extern char RCCONTEXT[]; /* special evaluation context */ |
97 |
– |
|
98 |
– |
extern char *formstr(int f); /* return format identifier */ |
101 |
|
|
102 |
|
extern void process_rcontrib(void); /* trace ray contributions */ |
103 |
|
|