ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bsdf_t.h
Revision: 3.1
Committed: Fri Feb 18 00:40:25 2011 UTC (13 years, 3 months ago) by greg
Content type: text/plain
Branch: MAIN
Log Message:
Major code reorg, moving mgflib to common and introducing BSDF material

File Contents

# Content
1 /*
2 * bsdf_t.h
3 *
4 * Support for variable-resolution BSDF trees
5 *
6 * Created by Greg Ward on 2/2/11.
7 *
8 */
9
10 #ifndef _BSDF_T_H_
11 #define _BSDF_T_H_
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #define SD_MAXDIM 4 /* maximum expected # dimensions */
18
19 /* Basic node structure for variable-resolution BSDF data */
20 typedef struct SDNode_s {
21 short ndim; /* number of dimensions */
22 short log2GR; /* log(2) of grid resolution (< 0 for tree) */
23 union {
24 struct SDNode_s *t[1]; /* subtree pointers */
25 float v[1]; /* scattering value(s) */
26 } u; /* subtrees or values (extends struct) */
27 } SDNode;
28
29 /* Load a variable-resolution BSDF tree from an open XML file */
30 extern SDError SDloadTre(SDData *sd, ezxml_t fl);
31
32 /* Our matrix handling routines */
33 extern const SDFunc SDhandleTre;
34
35 #ifdef __cplusplus
36 }
37 #endif
38 #endif /* ! _BSDF_T_H_ */