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