ssf_fresnel_no_op.c (1572B)
1 /* Copyright (C) 2016-2018, 2021-2025 |Méso|Star> (contact@meso-star.com) 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #include "ssf.h" 17 18 /******************************************************************************* 19 * Private functions 20 ******************************************************************************/ 21 static res_T 22 fresnel_no_op_init(struct mem_allocator* allocator, void* fresnel) 23 { 24 (void)allocator, (void)fresnel; 25 return RES_OK; 26 } 27 28 static void 29 fresnel_no_op_release(void* fresnel) 30 { 31 (void)fresnel; 32 } 33 34 static double 35 fresnel_no_op_eval(void* fresnel, const double cos_theta) 36 { 37 (void)fresnel, (void)cos_theta; 38 return 1.0; 39 } 40 41 /******************************************************************************* 42 * Exported symbol 43 ******************************************************************************/ 44 const struct ssf_fresnel_type ssf_fresnel_no_op = { 45 fresnel_no_op_init, 46 fresnel_no_op_release, 47 fresnel_no_op_eval, 48 0, 1 49 }; 50