sln_polyline.h (1452B)
1 /* Copyright (C) 2022, 2026 |Méso|Star> (contact@meso-star.com) 2 * Copyright (C) 2026 Université de Lorraine 3 * Copyright (C) 2022 Centre National de la Recherche Scientifique 4 * Copyright (C) 2022 Université Paul Sabatier 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 19 #ifndef SLN_POLYLINE_H 20 #define SLN_POLYLINE_H 21 22 #include <rsys/rsys.h> 23 24 /* Forward declaration */ 25 struct sln_device; 26 struct sln_vertex; 27 28 /* In place simplification of a polyline. Given a curve composed of line 29 * segments, compute a similar curve with fewer points. The range of this new 30 * polyline is returned in `vertices_range'. */ 31 extern LOCAL_SYM res_T 32 polyline_decimate 33 (struct sln_device* sln, 34 struct sln_vertex* vertices, 35 size_t vertices_range[2], 36 const float err, /* Relative error */ 37 const enum sln_mesh_type mesh_type); 38 39 #endif /* SLN_POLYLINE_H */