1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ SGI" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* Quadtree data structures for holodeck display drivers. |
4 |
|
*/ |
5 |
+ |
#ifndef _RAD_RHD_QTREE_H_ |
6 |
+ |
#define _RAD_RHD_QTREE_H_ |
7 |
|
|
8 |
+ |
#include "color.h" |
9 |
|
#include "tonemap.h" |
10 |
|
#include "rhdriver.h" |
11 |
|
|
12 |
< |
#ifndef int2 |
13 |
< |
#define int2 short |
12 |
> |
#ifdef __cplusplus |
13 |
> |
extern "C" { |
14 |
|
#endif |
15 |
< |
#ifndef int4 |
16 |
< |
#define int4 int |
17 |
< |
#endif |
18 |
< |
/* child ordering */ |
15 |
> |
|
16 |
|
#define DL 0 /* down left */ |
17 |
|
#define DR 1 /* down right */ |
18 |
|
#define UL 2 /* up left */ |
37 |
|
|
38 |
|
extern struct rleaves { |
39 |
|
float (*wp)[3]; /* world intersection point array */ |
40 |
< |
int4 *wd; /* world direction array */ |
40 |
> |
int32 *wd; /* world direction array */ |
41 |
|
TMbright *brt; /* encoded brightness array */ |
42 |
< |
BYTE (*chr)[3]; /* encoded chrominance array */ |
43 |
< |
BYTE (*rgb)[3]; /* tone-mapped color array */ |
42 |
> |
uby8 (*chr)[3]; /* encoded chrominance array */ |
43 |
> |
uby8 (*rgb)[3]; /* tone-mapped color array */ |
44 |
|
int nl; /* count of leaves in our pile */ |
45 |
|
int bl, tl; /* bottom and top (next) leaf index */ |
46 |
|
int tml; /* next leaf needing tone-mapping */ |
55 |
|
|
56 |
|
extern int rayqleft; /* number of rays to queue before flush */ |
57 |
|
|
58 |
< |
extern int4 encodedir(); |
59 |
< |
extern double fdir2diff(), dir2diff(); |
58 |
> |
extern TMstruct *tmGlobal; /* global tone-mapping structure */ |
59 |
> |
|
60 |
> |
/* rhd_qtree.c */ |
61 |
> |
extern int qtAllocLeaves(register int n); |
62 |
> |
extern void qtFreeLeaves(void); |
63 |
> |
extern int qtCompost(int pct); |
64 |
> |
extern void qtReplant(void); |
65 |
> |
extern int qtFindLeaf(int x, int y); |
66 |
> |
extern int qtMapLeaves(int redo); |
67 |
> |
/* rhd_qtree2c.c rhd_qtree2r.c */ |
68 |
> |
extern void qtRedraw(int x0, int y0, int x1, int y1); |
69 |
> |
extern void qtUpdate(void); |
70 |
> |
|
71 |
> |
#ifdef __cplusplus |
72 |
> |
} |
73 |
> |
#endif |
74 |
> |
#endif /* _RAD_RHD_QTREE_H_ */ |
75 |
> |
|