summaryrefslogtreecommitdiff
path: root/assetFactory/shape.cpp
blob: 9aaae0513d8d3776d64133f32032de0ee8e0d1ba (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 RelativePosition3D> 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;
}