summaryrefslogtreecommitdiff
path: root/assetFactory/shape.cpp
blob: 0f83ee59cdbeed813cc80ebece3b7a6a9bc862b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "shape.h"
#include "modelFactoryMesh.h"
#include "shape.h"

std::vector<OpenMesh::VertexHandle>
Shape::addToMesh(ModelFactoryMesh & mesh, const std::span<const Position3D> 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;
}