cg_ground.h (1825B)
1 /* Copyright (C) 2022 Université de Pau et des Pays de l'Adour UPPA 2 * Copyright (C) 2022 CNRS 3 * Copyright (C) 2022 Sorbonne Université 4 * Copyright (C) 2022 Université Paul Sabatier 5 * Copyright (C) 2022 |Meso|Star> (contact@meso-star.com) 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 #ifndef GROUND_H 21 #define GROUND_H 22 23 #include "cg_types.h" 24 25 #include <rsys/rsys.h> 26 #include <rsys/dynamic_array_double.h> 27 28 struct city; 29 struct scad_geometry; 30 struct mem_allocator; 31 struct logger; 32 33 struct ground { 34 /* cad representation */ 35 struct scad_geometry* box; 36 struct darray_geometries boundaries; 37 struct darray_geometries footprints; 38 struct darray_double ground_building_connections; /* Connection of unremoved buildings */ 39 struct darray_double ground_patches; /* patches for removed buildings */ 40 struct scad_geometry* top; /* Uncounted ptr to top boundary */ 41 struct scad_geometry* bottom; /* Uncounted ptr to bottom boundary */ 42 }; 43 44 res_T 45 ground_build_cad 46 (struct mem_allocator* allocator, 47 struct city* city); 48 49 res_T 50 ground_export_stl 51 (struct city* city); 52 53 void 54 ground_init 55 (struct mem_allocator* allocator, 56 struct ground* ground); 57 58 void 59 ground_clear 60 (struct ground* ground); 61 62 #endif /* GROUND */