| 9 |
|
* in the surface plane pointed to the right as seen from the front. |
| 10 |
|
* This means the Y-axis is "up" and the Z-axis is the surface normal. |
| 11 |
|
* |
| 12 |
+ |
* Note that we reverse the identification of "front" and "back" from |
| 13 |
+ |
* the conventions used in WINDOW 6. "Front" in our library points |
| 14 |
+ |
* in the +Z direction, towards the interior of the space rather |
| 15 |
+ |
* than the exterior. |
| 16 |
+ |
* |
| 17 |
|
* BSDF vectors always oriented away from surface, even when "incident." |
| 18 |
|
* |
| 19 |
|
* Created by Greg Ward on 1/10/11. |
| 33 |
|
#define SDnameLn 128 /* maximum BSDF name length */ |
| 34 |
|
#define SDmaxCh 3 /* maximum # spectral channels */ |
| 35 |
|
|
| 36 |
< |
/* Component flags for SDsampBSDF() and SDhemiScatter() */ |
| 36 |
> |
/* Component flags for SDsampBSDF() and SDdirectHemi() */ |
| 37 |
|
#define SDsampR 0x1 /* include reflection */ |
| 38 |
|
#define SDsampT 0x2 /* include transmission */ |
| 39 |
|
#define SDsampS 0x3 /* include scattering (R+T) */ |
| 44 |
|
#define SDsampSpS 0x7 /* include non-diffuse scattering */ |
| 45 |
|
#define SDsampAll 0xF /* include everything */ |
| 46 |
|
|
| 47 |
< |
/* Projected solid angle query flags fos SDsizeBSDF() */ |
| 48 |
< |
#define SDqueryInc 0x1 /* query incoming vector */ |
| 49 |
< |
#define SDqueryOut 0x2 /* query outgoing vector */ |
| 50 |
< |
#define SDqueryMin 0x4 /* query minimum proj. solid angle */ |
| 46 |
< |
#define SDqueryMax 0x8 /* query maximum proj. solid angle */ |
| 47 |
> |
/* Projected solid angle query flags for SDsizeBSDF() */ |
| 48 |
> |
#define SDqueryVal 0x0 /* query single value */ |
| 49 |
> |
#define SDqueryMin 0x1 /* query minimum proj. solid angle */ |
| 50 |
> |
#define SDqueryMax 0x2 /* query maximum proj. solid angle */ |
| 51 |
|
|
| 52 |
|
/* Error codes: normal return, out of memory, file i/o, file format, bad argument, |
| 53 |
|
bad data, unsupported feature, internal error, unknown error */ |
| 140 |
|
* The following routines are less commonly used by applications. |
| 141 |
|
*/ |
| 142 |
|
|
| 143 |
< |
#define SDisLoaded(sd) ((sd)->rLambFront.spec.clock != 0) |
| 143 |
> |
#define SDisLoaded(sd) ((sd)->rLambFront.spec.flags != 0) |
| 144 |
|
|
| 145 |
|
/* Report an error to the indicated stream (in English) */ |
| 146 |
|
extern SDError SDreportEnglish(SDError ec, FILE *fp); |
| 227 |
|
/* Transform and normalize direction (column) vector */ |
| 228 |
|
extern SDError SDmapDir(FVECT resVec, RREAL vMtx[3][3], |
| 229 |
|
const FVECT inpVec); |
| 230 |
+ |
|
| 231 |
+ |
/* System-specific BSDF loading routine (not part of our library) */ |
| 232 |
+ |
extern SDData *loadBSDF(char *name); |
| 233 |
+ |
|
| 234 |
+ |
/* System-specific BSDF error translator (not part of our library) */ |
| 235 |
+ |
extern char *transSDError(SDError ec); |
| 236 |
|
|
| 237 |
|
/*################################################################*/ |
| 238 |
|
/*######### DEPRECATED DEFINITIONS AWAITING PERMANENT REMOVAL #######*/ |