htrdr_atmosphere_args.h.in (6261B)
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 de Physique du Globe de Paris 4 * Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com) 5 * Copyright (C) 2022-2025 Université de Reims Champagne-Ardenne 6 * Copyright (C) 2022-2025 Université de Versaille Saint-Quentin 7 * Copyright (C) 2018-2019, 2022-2025 Université Paul Sabatier 8 * 9 * This program is free software: you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation, either version 3 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 21 22 #ifndef HTRDR_ATMOSPHERE_ARGS_H 23 #define HTRDR_ATMOSPHERE_ARGS_H 24 25 #include "core/htrdr_args.h" 26 27 #include <rsys/rsys.h> 28 29 #include <limits.h> /* UINT_MAX support */ 30 31 enum htrdr_atmosphere_args_output_type { 32 HTRDR_ATMOSPHERE_ARGS_OUTPUT_FLUX_MAP, 33 HTRDR_ATMOSPHERE_ARGS_OUTPUT_IMAGE, 34 HTRDR_ATMOSPHERE_ARGS_OUTPUT_OCTREES, 35 HTRDR_ATMOSPHERE_ARGS_OUTPUT_TYPES_COUNT__ 36 }; 37 38 struct htrdr_atmosphere_args { 39 const char* filename_gas; /* Path of the gas file */ 40 const char* filename_les; /* Path of the HTCP file */ 41 const char* filename_mie; /* Path of the Mie properties */ 42 const char* filename_obj; /* Path of the ground geometry */ 43 const char* filename_mtl; /* Path of the ground materials */ 44 45 const char* filename_cache; /* Path of the file to store/restore cached data */ 46 const char* filename_output; /* Name of the output file */ 47 48 const char* sky_mtl_name; /* Name of the sky material */ 49 50 struct htrdr_args_camera_perspective cam_persp; /* Perspective camera */ 51 struct htrdr_args_camera_orthographic cam_ortho; /* Orthographic camera */ 52 enum htrdr_args_camera_type cam_type; 53 54 struct htrdr_args_rectangle flux_map; /* Flux map */ 55 56 struct htrdr_args_image image; /* Output Image */ 57 struct htrdr_args_spectral spectral; /* Spectral domain */ 58 59 double sun_azimuth; /* In degrees */ 60 double sun_elevation; /* In degrees */ 61 62 /* Parameters of the volumetric acceleration data structures */ 63 double optical_thickness; /* Threshold used during octree building */ 64 unsigned grid_max_definition[3]; /* Maximum definition of the grid */ 65 66 int repeat_clouds; /* Make the clouds infinite in X and Y */ 67 int repeat_ground; /* Make the ground infinite in X and Y */ 68 69 /* Miscellaneous parameters */ 70 unsigned nthreads; /* Hint on the number of threads to use */ 71 enum htrdr_atmosphere_args_output_type output_type; 72 int force_overwriting; 73 int verbose; /* Verbosity level */ 74 int quit; /* Stop the command */ 75 }; 76 77 #define HTRDR_ATMOSPHERE_ARGS_DEFAULT__ { \ 78 NULL, /* Gas filename */ \ 79 NULL, /* LES filename */ \ 80 NULL, /* Mie filename */ \ 81 NULL, /* Obj filename */ \ 82 NULL, /* Mtl filename */ \ 83 \ 84 NULL, /* Cache filename */ \ 85 NULL, /* Output filename */ \ 86 \ 87 @HTRDR_ATMOSPHERE_ARGS_DEFAULT_SKY_MTL_NAME@, /* Sky mtl name */ \ 88 \ 89 HTRDR_ARGS_CAMERA_PERSPECTIVE_DEFAULT__, /* Perspective camera */ \ 90 HTRDR_ARGS_CAMERA_ORTHOGRAPHIC_DEFAULT__, /* Orthographic camera */ \ 91 HTRDR_ARGS_CAMERA_PERSPECTIVE, \ 92 \ 93 HTRDR_ARGS_RECTANGLE_DEFAULT__, /* Flux map */ \ 94 \ 95 HTRDR_ARGS_IMAGE_DEFAULT__, /* Image */ \ 96 HTRDR_ARGS_SPECTRAL_DEFAULT__, /* Spectral */ \ 97 \ 98 0, /* Sun azimuth */ \ 99 90, /* Sun elevation */ \ 100 \ 101 @HTRDR_ATMOSPHERE_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD@, \ 102 {UINT_MAX, UINT_MAX, UINT_MAX}, /* Maximum definition of the grid */ \ 103 \ 104 0, /* Repeat clouds */ \ 105 0, /* Repeat ground */ \ 106 \ 107 UINT_MAX, /* #threads */ \ 108 HTRDR_ATMOSPHERE_ARGS_OUTPUT_IMAGE, /* Output type */ \ 109 0, /* Force overwriting */ \ 110 0, /* Verbose flag */ \ 111 0 /* Stop the command */ \ 112 } 113 static const struct htrdr_atmosphere_args HTRDR_ATMOSPHERE_ARGS_DEFAULT = 114 HTRDR_ATMOSPHERE_ARGS_DEFAULT__; 115 116 extern LOCAL_SYM res_T 117 htrdr_atmosphere_args_init 118 (struct htrdr_atmosphere_args* args, 119 int argc, 120 char** argv); 121 122 extern LOCAL_SYM void 123 htrdr_atmosphere_args_release 124 (struct htrdr_atmosphere_args* args); 125 126 #endif /* HTRDR_ATMOSPHERE_ARGS_H */