8 |
|
|
9 |
|
#include "tonemap.h" |
10 |
|
#include "rhdriver.h" |
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 |
< |
|
60 |
< |
/************************************************************************ |
51 |
< |
* These driver support routines implement the dev_value() call, but |
52 |
< |
* require the following callbacks: |
53 |
< |
|
54 |
< |
dev_paintr(rgb, x0, y0, x1, y1) : paint a rectangle |
55 |
< |
BYTE rgb[3]; : rectangle color |
56 |
< |
int x0, y0, x1, y1; : rectangle boundaries |
57 |
< |
|
58 |
< |
Draws an open rectangle between [x0,x1) and [y0,y1) with the color rgb. |
59 |
< |
This function is called many times by qtUpdate(), qtRedraw() and qtReplant(). |
60 |
< |
|
61 |
< |
************************************************************************/ |
59 |
> |
extern int4 encodedir(); |
60 |
> |
extern double fdir2diff(), dir2diff(); |