blob: 32613544394fad9d14d499bbf477c91cf089a9c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "shape.h"
#include "gfx/models/vertex.hpp"
#include "maths.h"
#include "modelFactoryMesh.h"
#include "shape.h"
std::vector<OpenMesh::VertexHandle>
Shape::addToMesh(ModelFactoryMesh & mesh, const std::span<const glm::vec3> vertices)
{
std::vector<OpenMesh::VertexHandle> vhs;
std::transform(vertices.begin(), vertices.end(), std::back_inserter(vhs), [&mesh](const auto & p) {
return mesh.add_vertex(p);
});
return vhs;
}
|