Skip to content
Snippets Groups Projects
Commit d4a99aa8 authored by Philip Trettner's avatar Philip Trettner
Browse files

mesh copy

parent a3231335
Branches
No related tags found
No related merge requests found
#pragma once
#include "Mesh.hh"
#include <tuple>
namespace polymesh
{
/// copies a mesh and the given attributes (new versions are returned)
///
/// e.g.:
/// auto [m2, pos2] = copy(m, pos);
template <class... Attrs>
std::tuple<unique_ptr<Mesh>, Attrs...> copy(Mesh const& m, Attrs const&... attrs)
{
auto m2 = m.copy();
auto const& m2_ref = *m2;
return std::make_tuple(std::move(m2), attrs.copy_to(m2_ref)...);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment