ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bsdf_t.h
(Generate patch)

Comparing ray/src/common/bsdf_t.h (file contents):
Revision 3.1 by greg, Fri Feb 18 00:40:25 2011 UTC vs.
Revision 3.9 by greg, Sun Aug 21 22:38:12 2011 UTC

# Line 1 | Line 1
1 + /* RCSid $Id$ */
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   *
# Line 26 | Line 29 | typedef struct SDNode_s {
29          } u;                    /* subtrees or values (extends struct) */
30   } SDNode;
31  
32 + #define SD_UFRONT       0x1     /* flag for BSDF uses front side */
33 + #define SD_UBACK        0x2     /* flag for BSDF uses back side */
34 + #define SD_XMIT         0x3     /* combine the two for transmission */
35 +
36 + /* Variable-resolution BSDF holder */
37 + typedef struct {
38 +        int     sidef;          /* transmitted component? */
39 +        SDNode  *st;            /* BSDF tree */
40 + } SDTre;
41 +
42 + /* Holder for cumulative distribution (sum of BSDF * projSA) */
43 + typedef struct SDTreCDst_s {
44 +                                /* base fields; must come first */
45 +        SD_CDIST_BASE(SDTreCDst_s);
46 +        double  clim[2][2];     /* input coordinate limits */
47 +        double  max_psa;        /* maximum projected solid angle */
48 +        short   sidef;          /* which side(s) to use */
49 +        short   isodist;        /* isotropic distribution? */
50 +        int     calen;          /* cumulative array length */
51 +        struct {
52 +                unsigned        hndx;   /* hilbert index */
53 +                unsigned        cuml;   /* cumulative value */
54 +        }               carr[1];        /* cumulative array (extends struct) */
55 + } SDTreCDst;    
56 +
57 + #ifdef _EZXML_H
58   /* Load a variable-resolution BSDF tree from an open XML file */
59 < extern SDError          SDloadTre(SDData *sd, ezxml_t fl);
59 > extern SDError          SDloadTre(SDData *sd, ezxml_t wtl);
60 > #endif
61  
62   /* Our matrix handling routines */
63 < extern const SDFunc     SDhandleTre;
63 > extern SDFunc   SDhandleTre;
64  
65   #ifdef __cplusplus
66   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines