co-maps/libs/geometry/smoothing.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
539 B
C++
Raw Normal View History

2025-11-22 13:58:55 +01:00
#pragma once
#include "geometry/point2d.hpp"
#include <vector>
namespace m2
{
using GuidePointsForSmooth = std::vector<std::pair<m2::PointD, m2::PointD>>;
// https://en.wikipedia.org/wiki/Centripetal_CatmullRom_spline
double constexpr kUniformAplha = 0.0;
double constexpr kCentripetalAlpha = 0.5;
double constexpr kChordalAlpha = 1.0;
void SmoothPaths(GuidePointsForSmooth const & guidePoints, size_t newPointsPerSegmentCount, double smoothAlpha,
std::vector<std::vector<m2::PointD>> & paths);
} // namespace m2