Commit d4a99aa8 authored by Philip Trettner's avatar Philip Trettner
Browse files

mesh copy

parent a3231335
#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)...);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment