sphor_ran_source.h (2308B)
1 /* Copyright (C) 2024-2026 Centre National de la Recherche Scientifique 2 * Copyright (C) 2024-2026 Clermont Auvergne INP 3 * Copyright (C) 2024-2026 INSA Lyon 4 * Copyright (C) 2024-2026 Institut Mines Télécom Albi-Carmaux 5 * Copyright (C) 2024-2026 Institut National Polytechnique de Toulouse 6 * Copyright (C) 2024-2026 |Méso|Star> (contact@meso-star.com) 7 * Copyright (C) 2024-2026 PhotonLyX (info@photonlyx.com) 8 * Copyright (C) 2024-2026 Université de Lorraine 9 * Copyright (C) 2024-2026 Université Paul Sabatier 10 * Copyright (C) 2024-2026 Université Toulouse - Jean Jaurès 11 * 12 * This program is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation, either version 3 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 24 #ifndef SPHOR_RAN_SOURCES_H 25 #define SPHOR_RAN_SOURCES_H 26 27 #include <rsys/rsys.h> 28 29 /* Forward declarations */ 30 struct primitive_pos; 31 struct source_view; 32 struct sphor; 33 struct ssp_rng; 34 35 extern LOCAL_SYM res_T 36 source_surface_sample_direction 37 (struct sphor* sphor, 38 struct ssp_rng* rng, 39 struct primitive_pos* prim_pos, 40 double dir[3]); 41 42 extern LOCAL_SYM res_T 43 source_sample_wavelength 44 (struct sphor* sphor, 45 struct ssp_rng* rng, 46 struct source_view* source_view, 47 double* wavelength); 48 49 /* Sample a source view considering the discrete distribution of power of all 50 * sources in the config */ 51 extern LOCAL_SYM res_T 52 sample_source_view 53 (struct sphor* sphor, 54 struct ssp_rng* rng, 55 struct source_view** source_view); 56 57 /* Sample a source considering the discrete distribution of power and then 58 * sample a position uniformly in this source. */ 59 extern LOCAL_SYM res_T 60 sample_source_position 61 (struct sphor* sphor, 62 struct ssp_rng* rng, 63 struct source_view** source_view, 64 struct primitive_pos* position, 65 double pos[3]); 66 67 #endif /* SPHOR_RAN_SOURCES_H */