summaryrefslogtreecommitdiff
path: root/assetFactory/shape.cpp
blob: 1bfbdbbc78cd168dbeab2e4cb56c950dd5c2778f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "shape.h"
#include "gfx/models/vertex.h"
#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;
}