Add vecr::closed(path)
This commit is contained in:
parent
bae1fb8c08
commit
b73a37deea
2 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue