studio_geo_algo_c.h 982 B

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