--- ray/src/common/bsdf.h 2011/08/21 22:38:12 2.16 +++ ray/src/common/bsdf.h 2012/09/02 15:33:15 2.19 @@ -1,4 +1,4 @@ -/* RCSid $Id: bsdf.h,v 2.16 2011/08/21 22:38:12 greg Exp $ */ +/* RCSid $Id: bsdf.h,v 2.19 2012/09/02 15:33:15 greg Exp $ */ /* * bsdf.h * @@ -78,6 +78,8 @@ typedef struct SDCDst_s { /* ...encoded distribution extends struct */ } SDCDst; +extern const SDCDst SDemptyCD; /* empty distribution */ + /* Forward declaration of BSDF component */ typedef struct SDComp_s SDComponent; @@ -118,12 +120,15 @@ typedef struct { /* Loaded BSDF data */ typedef struct { char name[SDnameLn]; /* BSDF name (usu. derived from file) */ + char matn[SDnameLn]; /* material name */ + char makr[SDnameLn]; /* manufacturer */ char *mgf; /* geometric description (if any) */ float dim[3]; /* width, height, thickness (meters) */ SDValue rLambFront; /* diffuse front reflectance */ SDValue rLambBack; /* diffuse rear reflectance */ SDValue tLamb; /* diffuse transmission */ - SDSpectralDF *rf, *rb, *tf; /* non-diffuse BSDF components */ + SDSpectralDF *rf, *rb; /* non-diffuse BRDF components */ + SDSpectralDF *tf, *tb; /* non-diffuse BTDF components */ } SDData; /* List of loaded BSDFs */ @@ -155,6 +160,9 @@ extern void SDclipName(char res[SDnameLn], const char /* Allocate new spectral distribution function */ extern SDSpectralDF *SDnewSpectralDF(int nc); + +/* Add component(s) to spectral distribution function */ +extern SDSpectralDF *SDaddComponent(SDSpectralDF *odf, int nadd); /* Free a spectral distribution function */ extern void SDfreeSpectralDF(SDSpectralDF *df);