ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bsdf_t.h
Revision: 3.3
Committed: Sat Feb 19 01:48:59 2011 UTC (13 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 3.2: +2 -2 lines
Log Message:
Minor changes and fixes -- first working version of BSDF material

File Contents

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