htrdr_combustion_geometry_ray_filter.h (2283B)
1 /* Copyright (C) 2018-2019, 2022-2025 Centre National de la Recherche Scientifique 2 * Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux 3 * Copyright (C) 2022-2025 Institut Pierre-Simon Laplace 4 * Copyright (C) 2022-2025 Institut de Physique du Globe de Paris 5 * Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com) 6 * Copyright (C) 2022-2025 Observatoire de Paris 7 * Copyright (C) 2022-2025 Université de Reims Champagne-Ardenne 8 * Copyright (C) 2022-2025 Université de Versaille Saint-Quentin 9 * Copyright (C) 2018-2019, 2022-2025 Université Paul Sabatier 10 * 11 * This program is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation, either version 3 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 23 24 #ifndef HTRDR_COMBUSTION_GEOMETRY_RAY_FILTER_H 25 #define HTRDR_COMBUSTION_GEOMETRY_RAY_FILTER_H 26 27 #include <star/s3d.h> 28 #include <rsys/rsys.h> 29 30 struct geometry_ray_filter_context { 31 struct htrdr_geometry* geom; 32 33 /* Name of the medium attached to the interface to filter. An intersection is 34 * ignorer if the side of the intersected surface points toward the medium 35 * whose name is `medium_name`. */ 36 const char* medium_name; 37 }; 38 39 #define GEOMETRY_RAY_FILTER_CONTEXT_NULL__ {NULL, NULL} 40 static const struct geometry_ray_filter_context 41 GEOMETRY_RAY_FILTER_CONTEXT_NULL = GEOMETRY_RAY_FILTER_CONTEXT_NULL__; 42 43 /* Filter function used to ignore the intersections with surfaces pointing 44 * toward a user defined medium */ 45 extern LOCAL_SYM int 46 geometry_ray_filter_discard_medium_interface 47 (const struct s3d_hit* hit, 48 const float ray_org[3], 49 const float ray_dir[3], 50 const float ray_range[2], 51 void* ray_data, /* Must point to a struct geometry_ray_filter_context */ 52 void* filter_data); 53 54 #endif /* HTRDR_COMBUSTION_GEOMETRY_RAY_FILTER_H */