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

Comparing ray/src/common/bsdf.h (file contents):
Revision 2.28 by greg, Sat Mar 27 17:50:18 2021 UTC vs.
Revision 2.31 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 3 | Line 3
3   *  bsdf.h
4   *  
5   *  Declarations for bidirectional scattering distribution functions.
6 *  Assumes <stdio.h> already included.
6   *
7   *  A material is oriented in right-hand coordinate system with X-axis
8   *      in the surface plane pointed to the right as seen from the front.
# Line 23 | Line 22
22   #ifndef _BSDF_H_
23   #define _BSDF_H_
24  
25 + #include "platform.h"
26   #include "fvect.h"
27   #include "ccolor.h"
28 #include "platform.h"
28  
29   #ifdef __cplusplus
30   extern "C" {
# Line 86 | Line 85 | typedef struct SDComp_s        SDComponent;
85   /* Methods needed to handle BSDF components (nothing is optional) */
86   typedef struct {
87                                          /* return non-diffuse BSDF */
88 <        int             (*getBSDFs)(float coef[SDmaxCh], const FVECT outVec,
89 <                                    const FVECT inVec, SDComponent *sdc);
88 >        int             (*getBSDFs)(float coef[SDmaxCh], const FVECT inVec,
89 >                                    const FVECT outVec, SDComponent *sdc);
90                                          /* query non-diffuse PSA for vector */
91          SDError         (*queryProjSA)(double *psa, const FVECT v1,
92                                                  const RREAL *v2, int qflags,
# Line 191 | Line 190 | extern SDError         SDsampComponent(SDValue *sv, FVECT ioV
190   /* Convert 1-dimensional random variable to N-dimensional */
191   extern void             SDmultiSamp(double t[], int n, double randX);
192  
194 /* Map a [0,1]^2 square to a unit radius disk */
195 extern void             SDsquare2disk(double ds[2], double seedx, double seedy);
196
197 /* Map point on unit disk to a unit square in [0,1]^2 range */
198 extern void             SDdisk2square(double sq[2], double diskx, double disky);
199
193   /*****************************************************************
194   * The calls below are the ones most applications require.
195   * All directions are assumed to be unit vectors.
# Line 215 | Line 208 | extern SDError         SDsizeBSDF(double *projSA, const FVECT
208                                          const SDData *sd);
209  
210   /* Return BSDF for the given incident and scattered ray vectors */
211 < extern SDError          SDevalBSDF(SDValue *sv, const FVECT outVec,
212 <                                        const FVECT inVec, const SDData *sd);
211 > extern SDError          SDevalBSDF(SDValue *sv, const FVECT inVec,
212 >                                        const FVECT outVec, const SDData *sd);
213  
214   /* Compute directional hemispherical scattering at given incident angle */
215   extern double           SDdirectHemi(const FVECT inVec,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines