2 |
|
/* |
3 |
|
* bsdf_t.h |
4 |
|
* |
5 |
< |
* Support for variable-resolution BSDF trees |
5 |
> |
* Support for variable-resolution BSDF trees. |
6 |
> |
* Assumes "bsdf.h" already included. |
7 |
> |
* Include after "ezxml.h" for SDloadTre() declaration. |
8 |
|
* |
9 |
|
* Created by Greg Ward on 2/2/11. |
10 |
|
* |
29 |
|
} u; /* subtrees or values (extends struct) */ |
30 |
|
} SDNode; |
31 |
|
|
32 |
+ |
/* Variable-resolution BSDF holder */ |
33 |
+ |
typedef struct { |
34 |
+ |
int isxmit; /* transmitted component? */ |
35 |
+ |
SDNode *st; /* BSDF tree */ |
36 |
+ |
} SDTre; |
37 |
+ |
|
38 |
+ |
/* Holder for cumulative distribution (sum of BSDF * projSA) */ |
39 |
+ |
typedef struct { |
40 |
+ |
SD_CDIST_BASE; /* base fields; must come first */ |
41 |
+ |
double clim[2][2]; /* input coordinate limits */ |
42 |
+ |
double max_psa; /* maximum projected solid angle */ |
43 |
+ |
int isxmit; /* transmitted component? */ |
44 |
+ |
int calen; /* cumulative array length */ |
45 |
+ |
struct { |
46 |
+ |
unsigned hndx; /* hilbert index */ |
47 |
+ |
unsigned cuml; /* cumulative value */ |
48 |
+ |
} carr[1]; /* cumulative array (extends struct) */ |
49 |
+ |
} SDTreCDst; |
50 |
+ |
|
51 |
+ |
#ifdef _EZXML_H |
52 |
|
/* Load a variable-resolution BSDF tree from an open XML file */ |
53 |
|
extern SDError SDloadTre(SDData *sd, ezxml_t wtl); |
54 |
+ |
#endif |
55 |
|
|
56 |
|
/* Our matrix handling routines */ |
57 |
< |
extern const SDFunc SDhandleTre; |
57 |
> |
extern SDFunc SDhandleTre; |
58 |
|
|
59 |
|
#ifdef __cplusplus |
60 |
|
} |