/** ****************************************************************************** * @file : studio_geo_algo_c.h * @author : wangyingjie * @brief : C 语言版 几何算法库: DP算法 * @attention : None * @date : 2025/5/11 ****************************************************************************** */ #ifndef STUDIO_GEO_ALGO_C_H #define STUDIO_GEO_ALGO_C_H #include "studio_geo_c.h" /////////////////// 矢量(线)抽稀算法 /////////////////// double point_line_dist_square_c(const studio_point_c *p, const studio_point_c *start, const studio_point_c *end); // Douglas-Peucker算法,用于简化多边形或曲线 void douglas_peucker_c(const studio_line_c *points, size_t start, size_t end, double epsilon, unsigned int *indices, unsigned int *index_count); bool line_vacuate_c(const studio_line_c *line, const int max_points, const double epsilon, studio_line_c *vacuate_line); #endif // STUDIO_GEO_ALGO_C_H