33 |
|
b_vecf *ob_vec; /* get output vector from index */ |
34 |
|
b_ndxf *ob_ndx; /* get output index from vector */ |
35 |
|
b_ohmf *ob_ohm; /* get output proj. SA for index */ |
36 |
+ |
C_CHROMA *chroma; /* chromaticity data */ |
37 |
|
float bsdf[1]; /* scattering data (extends struct) */ |
38 |
|
} SDMat; |
39 |
|
|
44 |
|
#define mBSDF_outvec(v,b,ox) (*(b)->ob_vec)(v,ox,(b)->ob_priv) |
45 |
|
#define mBSDF_outndx(b,v) (*(b)->ob_ndx)(v,(b)->ob_priv) |
46 |
|
#define mBSDF_outohm(b,o) (*(b)->ob_ohm)(o,(b)->ob_priv) |
47 |
< |
#define mBSDF_value(b,i,o) (b)->bsdf[(o)*(b)->ninc + (i)] |
47 |
> |
#define mBSDF_value(b,o,i) (b)->bsdf[(o)*(b)->ninc + (i)] |
48 |
> |
#define mBSDF_chroma(b,o,i) (b)->chroma[(o)*(b)->ninc + (i)] |
49 |
|
|
50 |
|
/* Holder for cumulative distribution (sum of BSDF * projSA) */ |
51 |
|
typedef struct SDMatCDst_s { |
63 |
|
#endif |
64 |
|
|
65 |
|
/* Our matrix handling routines */ |
66 |
< |
extern SDFunc SDhandleMtx; |
66 |
> |
extern const SDFunc SDhandleMtx; |
67 |
|
|
68 |
|
/******** Klems basis declarations for more intimate access ********/ |
69 |
|
|
84 |
|
extern ANGLE_BASIS abase_list[MAXABASES]; |
85 |
|
|
86 |
|
extern int nabases; /* current number of defined bases */ |
87 |
+ |
|
88 |
+ |
extern C_COLOR mtx_RGB_prim[3]; /* matrix RGB primaries */ |
89 |
+ |
extern float mtx_RGB_coef[3]; /* corresponding Y coefficients */ |
90 |
+ |
|
91 |
+ |
/* Get color or grayscale value for BSDF in the given directions */ |
92 |
+ |
extern int mBSDF_color(float coef[], const SDMat *b, int i, int o); |
93 |
|
|
94 |
|
/* Get vector for this angle basis index (front exiting) */ |
95 |
|
extern b_vecf fo_getvec; |