rngrd

Describe a surface and its physical properties
git clone git://git.meso-star.fr/rngrd.git
Log | Files | Refs | README | LICENSE

commit c44a28638b5f67be4a4c4ca47f356f2fd195b2b8
parent 4ea2984344dfa6da3782cb1a3de941f956e01fcc
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 28 Sep 2022 08:48:00 +0200

Rename rngrd_create_brdf_args in rngrd_create_bsdf_args

Diffstat:
Msrc/rngrd.h | 10+++++-----
Msrc/rngrd_properties.c | 8++++----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/rngrd.h b/src/rngrd.h @@ -95,15 +95,15 @@ struct rngrd_trace_ray_args { static const struct rngrd_trace_ray_args RNGRD_TRACE_RAY_ARGS_DEFAULT = RNGRD_TRACE_RAY_ARGS_DEFAULT__; -struct rngrd_create_brdf_args { +struct rngrd_create_bsdf_args { struct s3d_primitive prim; /* Surfacic primitive to query */ double barycentric_coords[3]; /* Position into and relative to the cell */ double wavelength; /* In nanometers */ double r; /* Random number uniformly distributed in [0, 1[ */ }; -#define RNGRD_CREATE_BRDF_ARGS_NULL__ {S3D_PRIMITIVE_NULL__, {0,0,0}, 0, 0} -static const struct rngrd_create_brdf_args RNGRD_CREATE_BRDF_ARGS_NULL = - RNGRD_CREATE_BRDF_ARGS_NULL__; +#define RNGRD_CREATE_BSDF_ARGS_NULL__ {S3D_PRIMITIVE_NULL__, {0,0,0}, 0, 0} +static const struct rngrd_create_bsdf_args RNGRD_CREATE_BSDF_ARGS_NULL = + RNGRD_CREATE_BSDF_ARGS_NULL__; /* Opaque data types */ struct rngrd; @@ -143,7 +143,7 @@ rngrd_trace_ray RNGRD_API res_T rngrd_create_bsdf (struct rngrd* ground, - const struct rngrd_create_brdf_args* args, + const struct rngrd_create_bsdf_args* args, struct ssf_bsdf** bsdf); END_DECLS diff --git a/src/rngrd_properties.c b/src/rngrd_properties.c @@ -34,9 +34,9 @@ * Helper functions ******************************************************************************/ static INLINE res_T -check_create_brdf_args +check_create_bsdf_args (const struct rngrd* ground, - const struct rngrd_create_brdf_args* args) + const struct rngrd_create_bsdf_args* args) { double sum_bcoords; ASSERT(ground); @@ -228,7 +228,7 @@ error: res_T rngrd_create_bsdf (struct rngrd* ground, - const struct rngrd_create_brdf_args* args, + const struct rngrd_create_bsdf_args* args, struct ssf_bsdf** out_bsdf) { struct mrumtl_brdf_lambertian lambertian; @@ -242,7 +242,7 @@ rngrd_create_bsdf res_T res = RES_OK; if(!ground || !out_bsdf) { res = RES_BAD_ARG; goto error; } - res = check_create_brdf_args(ground, args); + res = check_create_bsdf_args(ground, args); if(res != RES_OK) goto error; /* Retrieve the material id of the primitive to consider */