blob: 8b706760047b150f696b2549424c617097cd786f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "object.h"
#include <algorithm>
Object::Object(std::string i) : id {std::move(i)} { }
Object::CreatedFaces
Object::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const
{
CreatedFaces faces;
for (const auto & use : uses) {
auto useFaces = use->createMesh(mesh, mutation);
std::transform(useFaces.begin(), useFaces.end(), std::inserter(faces, faces.end()), [this](auto && face) {
return std::make_pair(id + ":" + face.first, std::move(face.second));
});
}
return faces;
}
|