New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,20 @@
#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