8 |
|
|
9 |
|
#include "tonemap.h" |
10 |
|
#include "rhdriver.h" |
11 |
< |
/* quantity of leaves to free at a time */ |
12 |
< |
#ifndef LFREEPCT |
13 |
< |
#define LFREEPCT 15 |
11 |
> |
|
12 |
> |
#ifndef int2 |
13 |
> |
#define int2 short |
14 |
|
#endif |
15 |
+ |
#ifndef int4 |
16 |
+ |
#define int4 int |
17 |
+ |
#endif |
18 |
|
/* child ordering */ |
19 |
|
#define DL 0 /* down left */ |
20 |
|
#define DR 1 /* down right */ |
40 |
|
|
41 |
|
extern struct rleaves { |
42 |
|
float (*wp)[3]; /* world intersection point array */ |
43 |
+ |
int4 *wd; /* world direction array */ |
44 |
|
TMbright *brt; /* encoded brightness array */ |
45 |
|
BYTE (*chr)[3]; /* encoded chrominance array */ |
46 |
|
BYTE (*rgb)[3]; /* tone-mapped color array */ |
50 |
|
char *base; /* base of allocated memory */ |
51 |
|
} qtL; /* our pile of leaves */ |
52 |
|
|
53 |
+ |
#define is_stump(t) (!((t)->flgs & (BR_ANY|LF_ANY))) |
54 |
+ |
|
55 |
|
extern RTREE qtrunk; /* trunk of quadtree */ |
56 |
|
extern double qtDepthEps; /* epsilon to compare depths (z fraction) */ |
57 |
|
extern int qtMinNodesiz; /* minimum node dimension (pixels) */ |
58 |
|
|
59 |
+ |
extern int rayqleft; /* number of rays to queue before flush */ |
60 |
|
|
61 |
< |
/************************************************************************ |
62 |
< |
* These driver support routines implement the dev_value() call, but |
56 |
< |
* require the following callbacks: |
57 |
< |
|
58 |
< |
dev_paintr(rgb, x0, y0, x1, y1) : paint a rectangle |
59 |
< |
BYTE rgb[3]; : rectangle color |
60 |
< |
int x0, y0, x1, y1; : rectangle boundaries |
61 |
< |
|
62 |
< |
Draws an open rectangle between [x0,x1) and [y0,y1) with the color rgb. |
63 |
< |
This function is called many times by qtUpdate(), qtRedraw() and qtReplant(). |
64 |
< |
|
65 |
< |
************************************************************************/ |
61 |
> |
extern int4 encodedir(); |
62 |
> |
extern double fdir2diff(), dir2diff(); |