Add vecr::closed(path)

This commit is contained in:
Nikita Lisitsa 2024-06-22 01:17:02 +03:00
parent bae1fb8c08
commit b73a37deea
2 changed files with 8 additions and 0 deletions

View file

@ -14,6 +14,8 @@ namespace psemek::vecr
std::vector<geom::point<float, 2>> points;
};
path closed(path path);
sdf_sample sdf(path const & s, geom::point<float, 2> const & p, bool closed = false);
geom::box<float, 2> bbox(path const & s);

View file

@ -5,6 +5,12 @@
namespace psemek::vecr
{
path closed(path path)
{
path.points.push_back(path.points.front());
return path;
}
sdf_sample sdf(path const & s, geom::point<float, 2> const & p, bool closed)
{
sdf_sample result;