htrdr_slab.h (2062B)
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_SLAB_H 25 #define HTRDR_SLAB_H 26 27 #include "core/htrdr.h" 28 #include <rsys/rsys.h> 29 30 /* Forward declaration */ 31 struct htrdr; 32 33 typedef res_T 34 (*htrdr_trace_cell_T) 35 (const double org[3], /* Ray origin */ 36 const double dir[3], /* Ray direction. Must be normalized */ 37 const double range[2], /* Ray range */ 38 void* ctx, /* User defined data */ 39 int* hit); /* Hit something ? */ 40 41 BEGIN_DECLS 42 43 /* Trace a ray into a slab composed of a cell infinitely repeated in X and Y */ 44 HTRDR_API res_T 45 htrdr_slab_trace_ray 46 (struct htrdr* htrdr, 47 const double org[3], 48 const double dir[3], 49 const double range[2], 50 const double cell_low[3], 51 const double cell_upp[3], 52 htrdr_trace_cell_T trace_cell, 53 const size_t max_steps, /* Max traversed cell */ 54 void* trace_cell_context); 55 56 END_DECLS 57 58 #endif /* HTRDR_SLAB_H */ 59